We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38441
    • 140 Posts
    Hi, I'm a new user of modx revo 2.2.0pl which im using to build my first modx site. After installing FormIt 2.0.3pl, i followed the tutorial for creating forms via http://codingpad.maryspad.com/2011/03/08/modx-revolution-for-complete-beginners-part-9-using-formit-for-contact-forms/

    I successfully created my first form on the contact page of my site, duplicated the code to create a second form which i amended to create a booking form, but on creating my 3rd & last form, it doesn't appear to be working fully. The 3rd form is just to collect a first name & email address by way of a mailing list on the site, so i was able to strip out most of the fields i'd used previously. However, the wrong validation error message appears instead of the one showing for other two forms (which i set to display- `Please complete all fields`), and when the form is completed it doesn't re-direct to my specified page, plus the form user doesn't get an auto response message. A copy of the message does however go to website owner / email address i've specified.

    I don't understand it since i've copied the exact same code from the two previous forms and they all function correctly.

    The code i'm using in this 3rd form if it's any help to understand this better is-

    [[!FormIt?
    &hooks=`email,redirect,spam,FormItAutoResponder`
    &emailFrom=`[email protected]`
    &emailFromName=`[email protected]`
    &emailReplyTo=`[email protected]`
    &emailReplyToName=`abc`
    &emailTpl=`listEmailTpl`
    &emailSubject=`Website Mailing List`
    &emailTo=`[email protected], [email protected]`
    &validate=`contact_name:required,
          contact_email:email:required,
    &validationErrorMessage=`*Please Complete All Fields`
       &redirectTo=`25`
    &fiarTpl=`listResponseTpl`
    &fiarSubject=`Welcome to our mailing list`
    &fiarToField=`contact_email`
    &fiarFromName=`abc`
    &fiarFrom=`[email protected]`
    &fiarReplyTo=`[email protected]`
    &fiarReplyToName=`abc`
    ]]
    
    <form id="mailing_list" class="required" method="post" action="[[~[[*24]]]]">
    
    <p style="font-size:12px; font-weight:bold; color:#ff6f20; margin-bottom:2px;">[[!+fi.validation_error_message]]</p>
    
    
            <input name="submit" class="submit" type="image" src="images/go-button.png" value="Submit" style="width:51px; height:44px; float:right; margin-right:20px;"/> 
           
    	<label for="contact_name" style="color:#ff6f20; margin-right:5px; margin-left:10px;">Name</label>
    	<input id="contact_name" name="contact_name" size="30" class="required" value="[[!+fi.contact_name]]" style="width:215px;"/>
           
    	
    	
          
    	<label for="contact_email" style="margin-right:8px; margin-left:10px; color:#ff6f20;">Email</label>
    	<input id="contact_email" name="contact_email" size="30" class="required" value="[[!+fi.contact_email]]" style="width:215px;"/>
           	
            
           </form>
    
    


    I've tried keeping the form id the same as the previous two forms but no difference, and now i revert back to using a unique id for this 3rd form.

    This may be something obvious that i'm missing or a simple error but i've been staring at it since yesterday trying different settings to resolve the problem. Any suggestions would be greatly appreciated.

    (if i have more than one form on a page, even if they are completely different, is there anything i need to be aware of or special settings to use?) [ed. note: jaykaye last edited this post 14 years, 7 months ago.]
      • 38441
      • 140 Posts
      [solved]

      After some web searching, i found this on Bob's guide for newbies-

      http://bobsguides.com/insidious-modx-errors.html

      I knew it had to be something simple and the problem was identified within the first couple of lines on the page Bob kindly written (i missed out a single back-tick in the code above). Ace!!