Jump to main content Jump to doc navigation

This 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

  1. FormIt.Hooks
  2. FormIt.Validators
  3. FormIt.FormItRetriever
  4. FormIt.Tutorials and Examples
  5. FormIt.FormItCountryOptions
  6. 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

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Lefthandmedia
  • Murray Wood
  • eydolan
  • Following Sea
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • A. Moreno
  • Nick Clark
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$301 per month—let's make that $500!

Learn more