We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26799
    • 177 Posts
    Eform outputs this error when I call the snippit on a page.

    Error
    Document or chunk not found for template id= ’’

    my Snippit call
    
    [[eForm? &to=`[email protected]`&gotoid=`1` &tpl=`ContactForm`]]
    
    


    also when I get this working would it be possible to append a query str to the $gotoid?
      • 26799
      • 177 Posts
      ok... so I figured out why I was getting the above error

      culprit
      
      <form method="post" action="#">
      
      


      solution
      
      <form method="post" action="[~[*id*]~]">
      
      


      however now I get a new one.

      New Error


      Invalid Form Id number or name.



      I think a lot of the problem I’m having is in my chunk, is there an example template somewhere that establishes a standard for working with the "eForm" snippit?
        • 26799
        • 177 Posts
        It wasn’t anything a little bit of the http://wiki.modxcms.com/index.php/EForm#Examples" target="_blank" rel="nofollow">wikki couldn’t solve..

        As it turns out, there are some requirements for making the chunks

        IE:&formid & [~[id]~]

        <form id="(should be the same as $formid parameter in snippit call)" name="(should be the same as $formid parameter in snippit call)" method="post">
        • Forms can’t have a "name" attribute if you want it to validate XHTML.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 26799
            • 177 Posts
            yeah I know, and Object tag won’t either. And it will validate under transitional. can you parse a form in .js using the getElementById() function?
            Until CSS 3 or higher is running flawlessly in IE semantics waste to much time. My motto right now is "if it works... it’ll work"... But you are correct it won’t validate W3C.

            INVALID: WCAG 1 Accessibility
            <ul>
              <li><a href="">link</a></li>
            </ul>
            


            VALID: WCAG 1 Accessibility
            <ul>
              <li><a href="">link</a> </li>
            </ul>
            


            WHY? it’s stupid.