prepareFormData
The prepareFormData hook is triggered after a form has been submitted, but
before it is processed. It passes the form data array, the form labels array
and the form object as arguments and does not expect a return value. This way
the data can be changed or extended, prior to execution of actions like email
distribution or data storage.
Parameters
array
$submittedDataThe user input from the form.
array
$labelsThe field labels of the form.
array
$fieldsThe fields for this form as an array of
\Contao\Widgetinstances.\Contao\Form
$formThe form instance.
Example