public function AjaxColorForm::updateColor in Examples for Developers 3.x
Same name and namespace in other branches
- 8 form_api_example/src/Form/AjaxColorForm.php \Drupal\form_api_example\Form\AjaxColorForm::updateColor()
Ajax callback for the color dropdown.
File
- modules/
form_api_example/ src/ Form/ AjaxColorForm.php, line 88
Class
- AjaxColorForm
- Implements the ajax demo form controller.
Namespace
Drupal\form_api_example\FormCode
public function updateColor(array $form, FormStateInterface $form_state) {
return $form['color_wrapper'];
}