We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    Having a very strange issue with Formit. I'm working on Revolution 2.5.7-pl and am using formit 4.0.0-pl.

    When I put the formit call above my form, the entire form disapears. I try stripping it back, and it will accept the first two parameters and nothing else after. I've even tried copy and pasting the example call from the documenation and have the same result. I'm very stumped as to why this is happeneing. Would really appreciate some help. Here is my formit call:


    [[!FormIt?
       &hooks=`email,spam,FormItSaveForm,redirect`
       &emailTpl=`form-contact-email`
       &emailTo=`[email protected]`
       &emailFrom=`[email protected]`
       &emailSubject=`From Submission from the [[*alias]] page from [[+first_name]]`
    
       &redirectTo=`81`
    	&validate=`first_name:required,
    		phone:required:minLength=^10^,
    		last_name:required,
    		email:email,
    		dontFill:blank`
    
    		&first_name.vTextRequired=`First Name is Required.`
    		&phone.vTextRequired=`Phone Number is Required.`
    		&last_name.vTextRequired=`Last Name is Required.`
    		&email.vTextEmailInvalid=`the email address is not valid`
    		&phone.vTextMinLength=`your phone number is not valid. Include a 10 digit phone number`
    ]]
    
    


    And here is my form:

    				<form class="interiorContactForm" action="[[++site_url]][[~[[*id]]]]" method="post" enctype="multipart/form-data">
    
    
    					<div class="formFieldGroup-half">
    						
    						<label>First Name</label>
    						
    						<input type="text" placeholder="First Name" name="first_name" id="first_name" value="[[!+fi.first_name]]" />
    					
    					</div><!-- close formFieldGroup -->
    					
    					<div class="formFieldGroup-half">
    						
    						<label>Last Name</label>
    					
    						<input type="text" placeholder="Last Name"  name="last_name" id="last_name" value="[[!+fi.last_name]]"/>
    					
    					</div><!-- close formFieldGroup -->
    					
    					<div class="formFieldGroup-half">
    						
    						<label>Phone</label>
    					
    						<input type="text" placeholder="Phone" name="phone" id="phone" value="[[!+phone]]"/>
    						
    					</div><!-- close formFieldGroup -->
    
    					<div class="formFieldGroup-half">
    						
    						<label>Email</label>
    					
    						<input type="text" placeholder="Email" name="email" id="email" value="[[!+email]]"/>
    						
    					</div><!-- close formFieldGroup -->
    					
    					<div class="formFieldGroup-full">
    						
    						<label>Message</label>
    					
    						<textarea></textarea>
    						
    						<input type="text" style="display:none;"  placeholder="home address" name="dontFill" id="dontFill" class="dontFill" />
    
    					
    					</div><!-- close formFieldGroup -->
    					
    					<div class="formFieldGroup-full">
    					
    						<input type="submit" placeholder="Email" value="Send us your message"/>
    					
    					</div><!-- close formFieldGroup -->
    				<div></div>
    				
    				
    								</form>
    				
    

    This question has been answered by rrswans. See the first response.

    • Mark Hamstra Reply #2, 6 years ago
      You're not on a really old version of PHP are you?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 38783
        • 571 Posts
        This is more of an additional question, than an answer to the original question, but I was wondering...

        I noticed that the default table type for Formit 4 is InnoDB. If the rest of the MODX database is myISAM is there any chance that this could cause a problem?
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
        • discuss.answer
          • 37165
          • 89 Posts
          Update: The form was inside a conditional template variable. I tried calling the chunk that contained the form as uncached and it worked.