backend.form.refreshFields

Called when the form is refreshed, giving the opportunity to modify the form fields

Example usage:

Event::listen('backend.form.refreshFields', function ((\Backend\Widgets\Form) $formWidget, (array) $allFields) {
    $allFields['name']->required = false;
});

Or

$formWidget->bindEvent('form.refreshFields', function ((array) $allFields) {
    $allFields['name']->required = false;
});

Usage

Triggers

Class or file Line
Backend\Widgets\Form 397
Copyright © 2024 Winter CMS