You are here

public function AjaxColorForm::updateColor in Examples for Developers 3.x

Same name and namespace in other branches
  1. 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\Form

Code

public function updateColor(array $form, FormStateInterface $form_state) {
  return $form['color_wrapper'];
}