Tutorials and Examples
Last updated Nov 27th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn moreThis page is a list of tutorials and examples for FormIt, as well as general usage tips.
Tutorials¶
Building Your Form¶
Email Handling¶
Redirection¶
Examples¶
Troubleshooting¶
Sometimes your form just seems to hang: you submit it, but nothing happens. What's going on?
A common error here is with validation. Try removing the &validation portion of the Snippet to see if that fixes the form. If it does, then you know that's where your problem is. A common error occurs when the validation rules reference the incorrect field names. For example, if you've changed the field names from what they were in the example, you must also change the field names used in the validation rules.
For example, if your form reads in part:
...
<input type="text" name="firstname" id="firstname" value="[[!+fi.firstname]]" />
...
Then the following validation rule will not work (for a full example of the Snippet call, see here):
...
&validate=`name:required`
...
Why? See how the field name is named "firstname" whereas the validation rule is looking for a field named "name"? Check these very carefully as you build and test your form.
Other reason that can cause FormIt silently failing is the lack of the "name" attribute in your form fields. Be sure to add the name attribute to all fields or FormIt will fail without returning any errors.
See Also¶
- FormIt.Hooks
- FormIt.Validators
- FormIt.FormItRetriever
- FormIt.Tutorials and Examples
- FormIt.FormItCountryOptions
- FormIt.FormItStateOptions
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn more