Last updated Apr 10th, 2021 | 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.
$292 per month—let's make that $500!Learn more
The 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
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
It has the following properties to be passed into the FormIt snippet call:
|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|