We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30093
    • 7 Posts
    I’m trying to create a simple contact form using FormIt.
    Here’s the snippet call and the form it self:
    [[FormIt? &hooks=`email` &emailTpl=`MyEmailChunk` &emailTo=`[email protected]`]]
    
    <form name="order" action="[[~[[*id]]]]" method="post" class="form">
    Name: <input type="text" name="name:required" id="name" value=[[+fi.name]] /><br/>  
    <div class="form-buttons">  
            <input type="submit" name="form-submit" value="Send" />  
    </div>  
    </form>
    


    No matter what I do, it doesn’t work and the placeholder [[+fi.name]] is visible in form field.
    What am I doing wrong?
    ModX version: Revo v.2.0.0-pl
    FormIt version: 1.2.0
      • 1778
      • 659 Posts
      Hello,

      You ommitted to put quotes (" ") around [[+fi.name]] in ’ value = " [[+fi.name]] " ’.
      It should be the problem...

      Hope this helps
      Cheers
        • 30093
        • 7 Posts
        Quote from: anso at Sep 03, 2010, 05:06 AM

        You ommitted to put quotes (" ")
        Hello, anso.
        Thank you for answer, but it’s not the case. With or without quotes it doesn’t work.. (((
        It seems like ModX doesn’t parse the formIt placeholders at all. (
          • 1778
          • 659 Posts
          I think you have to call the snippet UNcached too... Can you try this
          [[FormIt? &hooks=`email` &emailTpl=`MyEmailChunk` &emailTo=`[email protected]`]]
          


          And put the quotes around "[[+fi.name]]" too...
          Cheers
            • 30093
            • 7 Posts
            I added the quotes.
            I can’t see any differences between my code and the snippet call you suggest me to try. Are there any?(
              • 36926
              • 701 Posts
              Just checking, but you have installed formit.

              Whats rendering on the page?
                • 1778
                • 659 Posts
                Sorry (too fast to copy/paste I omitted to change the call) to UNcache the snippet you have to put an exclamation mark at the beginning of the snippet call
                [[!Formit? &hooks=`email` &emailTpl=`MyEmailChunk` &emailTo=`[email protected]` ]]
                


                Hope this helps this time ! smiley
                  • 30093
                  • 7 Posts
                  Quote from: anso at Sep 03, 2010, 05:57 AM

                  [[!Formit? &hooks=`email` &emailTpl=`MyEmailChunk` &emailTo=`[email protected]` ]]
                  

                  Now it shows the snippet call itself on the html page ((
                    • 30093
                    • 7 Posts
                    Quote from: bennyb at Sep 03, 2010, 05:52 AM

                    Just checking, but you have installed formit.

                    Whats rendering on the page?
                    Yes. The formIt is installed.
                      • 1778
                      • 659 Posts
                      Hi again,

                      I tested the code, it works fine here.

                      So just to be sure are you calling the snippet (ie : the "[[!Formit? &...]]" ) and the form on the same resource ?

                      If yes did you put the snippet call before the form ?

                      Please provide infos about your environement and install ....
                      Cheers