- π»π³Vietnam ducviethaboo Ha Noi
With multilingual site. Validate the form with
$submit_button['#value']->render() == 'Save permissions'
is not working because in another language, we will have another value for button. So I think it's better if give the submit button a value that we can detect when click this button, and validate the form with this value, somthing like that:
alter form:
$form["actions"]["submit"]['#saved_permission'] = TRUE;
and validate function will be:$submit_button = $form_state->getTriggeringElement(); // no need to run this validation when submitting filter changes. if (isset($submit_button['#saved_permission'])) {
- πΊπΈUnited States justcaldwell Austin, Texas
Hello @ducviethaboo!
This issue has been closed for quite a while. If you have a new/related problem to report, please create a new issue β .