We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31640
    • 100 Posts
    [[!FormIt?   
       &hooks=`email,redirect`   
       &emailTpl=`emailChunk`   
       &emailTo=`[email protected]`
       &emailSubject=`Vraag via de website`   
       &redirectTo=`14`
       &submitVar=`steljevraag`   
    ]]
          <form method="post" action="[[~[[*id]]]]" id="steljevraag" name="steljevraag">
                <div>
                  <label for="name"><strong>Naam:</strong><span class="error">[[+fi.error.name]]</span></label>
                  <input type="text" size="50" name="name:required" id="name" value="[[+fi.name:default=`Naam`]]" />
                </div>
                <div>
                  <label for="email"><strong>Email:</strong><span class="error">[[+fi.error.email]]</span></label>
                  <input type="text" size="50"  name="email:email:required" id="email" value="[[+fi.email:default=`Email`]]"  />
                </div>
                <div>
                  <label for="subject"><strong>Vraag:</strong><span class="error">[[+fi.error.subject]]</span></label>
                  <input type="text" name="subject:required" id="subject" value="[[+fi.subject:default=`Stel hier je vraag`]]" />
                </div>
            <div>
              <input type="submit" value="Verstuur bericht" name="submit" class="steljevraagsubmit" />
            </div>
          </form>
    


    I need to add the parameter submitVar to the formit code
    because i have 2 forms on a certain page
    But when i add this parameter my form doens’t work
    and doesn’t send mails and do the redirecting
    and i don’t know why, so please help smiley

    Or do i need to do something else to make this work with 2 forms on 1 page???

    When i delete the parameter it al works fine...
    I am working with modx 2.0.3 and formit 1.3.0
      • 40045
      • 534 Posts
      I think the submitVar has to be a formfield not the form itself...the form doesn’t get submitted, only inputs are posted and submitVar is a POST variable which has to be 1 (as "exists")
        • 6504
        • 23 Posts
        Could you illiterate further?

        How to you apply the submitvar to the form?

        Thanks
          • 31640
          • 100 Posts
          I changed in my form the input button.
          <input type="submit" value="Verstuur bericht" name="steljevraagsubmit"  class="steljevraagsubmit" /> 

          And changed in my snippet call to this
          &submitVar=`steljevraagsubmit`


          And everything works great...