protected static function ComponentSectionForm::removeAjax in Module Builder 8.3
Helper to remove all ajax from the form.
Use this when debugging, as if an ajax request is crashing, it's best to turn ajax off and use normal submission to see the error messages immediately rather than pick them out of the log.
1 call to ComponentSectionForm::removeAjax()
- ComponentSectionForm::componentPropertiesForm in src/
Form/ ComponentSectionForm.php - Add form elements for the specified component properties.
File
- src/
Form/ ComponentSectionForm.php, line 136
Class
- ComponentSectionForm
- Generic form for entering a section of data for a component.
Namespace
Drupal\module_builder\FormCode
protected static function removeAjax(&$element) {
foreach ($element as $key => &$value) {
if (is_array($value) && isset($value['#ajax'])) {
unset($value['#ajax']);
}
if (is_array($value)) {
static::removeAjax($value);
}
}
}