function HtmxTestForm::getTriggerElement
1 call to HtmxTestForm::getTriggerElement()
- HtmxTestForm::buildForm in core/
modules/ system/ tests/ modules/ test_htmx/ src/ Form/ HtmxTestForm.php - Form constructor.
File
-
core/
modules/ system/ tests/ modules/ test_htmx/ src/ Form/ HtmxTestForm.php, line 116
Class
- HtmxTestForm
- A small form used to test HTMX dynamic forms.
Namespace
Drupal\test_htmx\FormCode
protected function getTriggerElement($form_state) : string|bool {
$input = $form_state->getUserInput();
return !empty($input['_triggering_element_name']) ? $input['_triggering_element_name'] : FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.