<![CDATA[ FormIT: What is the error here? - My Forums]]> https://forums.modx.com/thread/?thread=103564 <![CDATA[FormIT: What is the error here?]]> https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557132

[[!FormIt?
&hooks=`recaptcha,spam,email,redirect,FormItSaveForm`
&formName=`Contact Form`
&emailTpl=`ChemicalDistributorAndSupplierFormTpl`
&emailSubject=`Admin - Nexeo Contact Form!`
&emailTo=`[email protected]`
&redirectTo=`123`
&validate=`
fname:required,
lname:required,
email:email:required,
company:required,
phone:required,
province:required,
subject:required,
message:required:stripTags,
select1:required,
select2:required`
]]

<div style="border: 2px solid #d5d5d5; background-color: #f3f3f3; width: 400px; margin: 0 auto; padding: 1em; font-family: Lato;">


[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]

<form action="[[~[[*id]]]]" method="post" class="form">
<h1 style="font-size: 32px; color: green; text-align: center;">Have a Question?</h1>
<p style="text-align: center; padding: 15px;">Fill out the form below to be contracted by a Sales team Member</p>
<input type="hidden" name="nospam" value="" />

<p style="text-align: center;">
<input style="width: 45%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.fname]]" name="fname" id="fname" placeholder="First Name*"/>
<input style="width: 45%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.lname]]" name="lname" id="fname" placeholder="Last Name*" />
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.fname]]</span>
<span class="error" style="font-size:10px;color:red;position:relative;left:5px;">[[!+fi.error.lname]]</span>
</p>
<p style="text-align: center;">
<input style="width: 91%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.email]]" name="email" id="email" placeholder="Email Address*"/>
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.email]]</span>
</p>
<p style="text-align: center;">
<input style="width: 91%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.company]]" name="company" id="company" placeholder="Company Name"/>
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.company]]</span>
</p>
<p style="text-align: center;">
<input style="width: 91%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.phone]]" name="phone" id="phone" placeholder="Phone Number"/>
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.phone]]</span>
</p>
<p style="text-align: center;">
<input style="width: 91%; border: 1px solid #d5d5d5; padding: 5px; color: #878585;" type="text" value="[[!+fi.province]]" name="province" id="province" placeholder="State/Province*"/>
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.province]]</span>
</p>

<p style="padding: 0 20px 0 20px; font-size: 14px;">Has you current company purchased from Nexeo Solutions in the past?</p>
<select style="width: 90%; left: 20px; position: relative; padding: 5px; color: #878585;" name="select1" value="[[!+fi.select1]]">
<option value="">Select an option...</option>
<option value="one" [[!+fi.select1:FormItIsSelected=`yes`]]>Yes</option>
<option value="two" [[!+fi.select1:FormItIsSelected=`no`]]>No</option>
</select>
</p>
<p style="padding: 0 20px 0 20px; font-size: 14px;">
What is your end market?</p>
<select style="width: 90%; left: 20px; position: relative; padding: 5px; color: #878585;" name="select2" value="[[!+fi.select2]]">
<option value="">Select an option...</option>
<option value="one" [[!+fi.select2:FormItIsSelected=`yes`]]>Yes</option>
<option value="two" [[!+fi.select2:FormItIsSelected=`no`]]>No</option>
</select>
</p>
<p style="text-align: center;">
<textarea style="width: 91%; padding: 5px; color: #878585;" name="message" id="message" rows="6" cols="25" placeholder="Message" value="[[!+fi.message]]">[[!+fi.message]]</textarea>
</p>
<p style="text-align: center;">
<span class="error" style="font-size:10px;color:red;float:left;position:relative;left:20px;">[[!+fi.error.message]]</span>
</p>
<br class="clear" />
[[!+formit.recaptcha_html]]
[[!+fi.error.recaptcha]]

<br class="clear" />

<div class="form-buttons">
<p style="text-align: center;">
<input style="font-size: 20px; text-transform: uppercase; color: #fff; background-color: #1f8c37; border: 1px solid; height: 5%; width: 90%;" type="submit" value="Send" />
</p>
</div>
</form>
</div>


----------------------------------------------------------------------------------------------------------------

FOR THE ChemicalDistributorAndSupplierFormTpl

Full Name: [[+fname]] [[+lname]]

Email: [[+email]]

Company Name: [[+company]]

Phone: [[+phone]]

State/Province: [[+province]]

Has you current company purchased from Nexeo Solutions in the past? [[+select1]]

What is your end market? [[+select2]]


Message: [[+message]]


]]>
emcteam Mar 02, 2018, 06:28 PM https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557132
<![CDATA[Re: FormIT: What is the error here?]]> https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557260 ]]> BobRay Mar 07, 2018, 09:23 PM https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557260 <![CDATA[Re: FormIT: What is the error here?]]> https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557142 lkfranklin Mar 03, 2018, 12:55 PM https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557142 <![CDATA[Re: FormIT: What is the error here?]]> https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557135
Second, try taking out the captcha and spam hooks to see if that gets things working. If a FormIt hook fails, the ones after it won't execute.

In my experience, the most common cause of trouble sending email is with the email sender (emailFrom) field.

People often use the email of the person who is filling out the form as the email sender so they can reply to the email. This usually doesn't work because that person doesn't have an email account at your host. Instead, use your own email at the host as the sender and the form-filler's email address for the reply-to field.]]>
BobRay Mar 02, 2018, 07:47 PM https://forums.modx.com/thread/103564/formit-what-is-the-error-here#dis-post-557135