Hi
I'm running Modx Revolution 2.3.1 with FormIt version 2.2.0-pl.
I've created a form to be used with FormIt - I've included the snippet call and HTML below. When ever I try to submit the form, I receive the following error message within the error log but the form submits correctly and redirects:
[2014-09-03 15:55:46] (INFO @ /index.php) [FormIt] Validator "required
" for field "addressPostCode" was not specified in the customValidators property.
Can anyone advise why this is the case? I've gone through my code and cannot see why this is happening. If I remove the offending field from the 'validate' property, the error still appears, but this time for the 'addressCounty' field.
[[!FormIt?
&hooks=`email[[!addSubscribeMailChimpHook]],redirect,spam`
&emailTpl=`BrochureRequestFormTpl`
&emailTo=`removed`
&emailBCC=`removed `
&emailSubject=`Brochure Request`
&emailFrom=`removed `
&mcApiKey=`removed `
&mcListId=`removed `
&mcEmailField=`emailAddress`
&mcDebug=`1`
&mcFailOnAlreadySubscribed=`1`
&mcMergeTags=`FNAME:firstName,LNAME:lastName,FULLNAME:firstName:lastName`
&validationErrorMessage=`<span class="error bold">Please check the information you have provided is correct and try submitting again.</span>`
&redirectTo=`113`
&validate=`
[[!validateFormItMailChimpHook]]
firstName:required,
lastName:required,
addressLine1:required,
addressTown:required,
addressCounty:required,
addressPostCode:required
`]]
Here's the HTML for the form:
[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
<form action="[[~[[*id]]]]" id="contact-form" method="POST">
<input type="hidden" name="nospam:blank" value="[[+fi.nospam]]" />
<div class="float-left width-equal">
<label for="brochures">Required Brochure(s):</label><br />
<select id="brochures" name="brochures">
<option value="2015 xxxxx Brochure" [[!+fi.brochures:FormItIsSelected=`2015 xxxxx Brochure`]] >2015 xxxxx Brochure</option>
<option value="2015 xxxxx Brochure" [[!+fi.brochures:FormItIsSelected=`2015 xxxxxx Brochure`]] >2015 xxxxx Brochure</option>
<option value="Both 2015 Brochures" [[!+fi.brochures:FormItIsSelected=`Both 2015 Brochures`]] >Both 2015 Brochures</option>
</select><br />
<label for="title">Title:</label><br />
<select id="title" name="title">
<option value="Miss" [[!+fi.title:FormItIsSelected=`Miss`]] >Miss</option>
<option value="Mr" [[!+fi.title:FormItIsSelected=`Mr`]] >Mr</option>
<option value="Mrs" [[!+fi.title:FormItIsSelected=`Mrs`]] >Mrs</option>
<option value="Ms" [[!+fi.title:FormItIsSelected=`Ms`]] >Ms</option>
</select><br />
<label for="firstName">First Name *:</label><span class="error">[[!+fi.error.firstName]]</span><br />
<input type="text" name="firstName" id="firstName" value="[[!+fi.firstName]]" /><br />
<label for="lastName">Last Name *:</label><span class="error">[[!+fi.error.lastName]]</span><br />
<input type="text" name="lastName" id="lastName" value="[[!+fi.lastName]]" /><br />
<label for="telephoneNumber">Telephone:</label><br />
<input type="text" name="telephoneNumber" id="telephoneNumber" value="[[!+fi.telephoneNumber]]" /><br />
<label for="emailAddress">Email:</label><span class="error">[[!+fi.error.emailAddress]]</span><br />
<input type="text" name="emailAddress" id="emailAddress" value="[[!+fi.emailAddress]]" /><br /><br />
<input type="checkbox" id="chkSubscribe" name="chkSubscribe" value="Yes" [[!+fi.chkSubscribe:FormItIsChecked=`Yes`]] >I would like to receive the email newsletter.
</div>
<div class="float-right width-equal">
<label for="addressLine1">Address Line 1 *:</label><span class="error">[[!+fi.error.addressLine1]]</span><br />
<input type="text" name="addressLine1" id="addressLine1" value="[[!+fi.addressLine1]]" /><br />
<label for="addressLine2">Address Line 2:</label><br />
<input type="text" name="addressLine2" id="addressLine2" value="[[!+fi.addressLine2]]" /><br />
<label for="addressTown">Town/City *:</label><span class="error">[[!+fi.error.addressTown]]</span><br />
<input type="text" name="addressTown" id="addressTown" value="[[!+fi.addressTown]]" /><br />
<label for="addressCounty">County *:</label><span class="error">[[!+fi.error.addressCounty]]</span><br />
<input type="text" name="addressCounty" id="addressCounty" value="[[!+fi.addressCounty]]" /><br />
<label for="addressPostCode">Post Code *:</label><span class="error">[[!+fi.error.addressPostCode]]</span><br />
<input type="text" name="addressPostCode" id="addressPostCode" value="[[!+fi.addressPostCode]]" /><br />
<label for="addressCountry">Country:</label><br />
<input type="text" name="addressCountry" id="addressCountry" value="[[!+fi.addressCountry]]" /><br />
</div>
<div class="clear"></div>
<input type="submit" class="float-left button" name="submit" value="Send" />
</form>