Basic HTML Forms
Basic HTML Forms (i.e. good old
There are a few quirks to be aware of:
FormJam Forms must use
<form method="POST" action="https://api.formjam.io/form/...">
HTML Forms cause the browser to navigate, which means we have to tell it where to go once the form is submitted.
If your form submission is successful:
- if you've specified a
redirectUrlin your Form's configuration, FormJam will redirect to it.
- if you haven't defined a
redirectUrl, the API will return a success page generated by FormJam.
If there are any errors in submitting your form:
- if you have specified an
errorRedirectUrlin your Form's configuration, FormJam will redirect to it. The redirect will have appended to the querystring
errorsis the validation errors object serialized using qs.stringify().
- if you have not specified an
errorRedirectUrlbut a have specified a
redirectUrl, this URL will be used instead, also with the error querystring.
- if neither have been specified, the API will return a failure page generated by FormJam.