Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/dev/reference/hooks/compileFormFields.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ and expects the modified form fields as return value.

2. *string* `$formId`

Alias of the current form. Used in the `value` attribute of the hidden form
field `FORM_SUBMIT`. Don't confuse with `$objForm->id`.
Alias of the current form with the prefix `auto_`. Don't confuse with `$form->id`.

3. *\Contao\Form* `$form`

Expand Down
5 changes: 2 additions & 3 deletions docs/dev/reference/hooks/loadFormField.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ field of the form generator.

2. *string* `$formId`

Alias of the current form. Used in the `value` attribute of the hidden form
field `FORM_SUBMIT`. Don't confuse with `$form->id`.
Alias of the current form with the prefix `auto_`. Don't confuse with `$form->id`.

3. *array* `$formData`

Expand Down Expand Up @@ -55,7 +54,7 @@ class LoadFormFieldListener
{
public function __invoke(Widget $widget, string $formId, array $formData, Form $form): Widget
{
if ('myForm' === $formId) {
if ('myForm' === $form->formID) {
$widget->class.= ' myclass';
}

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/reference/hooks/validateFormField.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object as return value.

2. *string* `$formId`

Alias of the current form. Used in the `value` attribute of the hidden form field `FORM_SUBMIT`. Do not confuse with `$form->id`.
Alias of the current form with the prefix `auto_`. Don't confuse with `$form->id`.

3. *array* `$formData`

Expand Down Expand Up @@ -52,7 +52,7 @@ class ValidateFormFieldListener
{
public function __invoke(Widget $widget, string $formId, array $formData, Form $form): Widget
{
if ('myform' === $formId && 'mywidget' === $widget->name) {
if ('myform' === $form->formID && 'mywidget' === $widget->name) {
// Do your custom validation and add an error if widget does not validate
// …

Expand Down