FormItLoadSavedForm
Last updated Apr 10th, 2021 | Page history | Improve this page | Report an issue
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
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 |