loadFormField
The loadFormField hook is triggered when a form field is loaded. It passes the
widget object, the form ID and the form data as arguments and expects a widget
object as return value. This hook can be used to dynamically alter or extend a form
field of the form generator.
Parameters
\Contao\Widget
$widgetInstance of the current front end widget.
string
$formIdAlias of the current form with the prefix
auto_. Don’t confuse with$form->id.array
$formDataThe form configuration, a
tl_formrecord.\Contao\Form
$formThe form instance.
Return Values
Return the $widget instance. You can override it’s settings or even create
your own widget instead.