FormItLoadSavedForm
Last updated Apr 29th, 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
$301 per month—let's make that $500!
Learn moreThe FormItLoadSavedForm preHook¶
This pre-hook will load the data for submitted forms by the provided hash, which is also available on the CMP of FormIt. It needs to be used together with the FormIt.Hooks.FormItSaveForm
Usage¶
To use the preHook, you need to use the following snippet call
[[!FormIt?
&preHooks=`FormItLoadSavedForm`
&updateSavedForm=`true`
&savedFormHashKeyField=`yourCustomGetParameter`
&hooks=`FormItSaveForm`
&formFields=`name,address,zipCode,town` // parameter of FormItSaveForm
]]
// open the page in the browser
// http://your-domain.com/path/to/form?yourCustomGetParameter=<FormHashFromFormItCMP>
Please note: you must not use the parameter fieldNames
because it makes assigning the form values to the fields impossible
Available Properties¶
It has the following properties to be passed into the FormIt snippet call:
name | description |
---|---|
savedFormHashKeyField | The get parameter to take the submission hash from the url. Defaults to "savedFormHashKey". |
updateSavedForm | If loading the previously submitted form values should be possible. Defaults to false. |
returnValueOnFail | If the preHook should return true on fail. Defaults to true |
See Also¶
- FormIt.Hooks.email
- FormIt.Hooks.FormItAutoResponder
- FormIt.Hooks.FormItSaveForm
- FormIt.Hooks.math
- FormIt.Hooks.recaptcha
- FormIt.Hooks.redirect
- FormIt.Hooks.spam
- FormIt.PreHooks.FormItLoadSavedForm
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
$301 per month—let's make that $500!
Learn more