You are here

public function ElevateZoomPlusForm::removeRespond in ElevateZoom Plus 8

Handles removing the responds.

File

modules/ui/src/Form/ElevateZoomPlusForm.php, line 327

Class

ElevateZoomPlusForm
Extends base form for elevatezoomplus instance configuration form.

Namespace

Drupal\elevatezoomplus_ui\Form

Code

public function removeRespond(array &$form, FormStateInterface &$form_state) {
  $num = $form_state
    ->get('num_responds');
  if ($num > 0) {
    $form_state
      ->set('num_responds', $num - 1);
  }
  $form_state
    ->setRebuild(TRUE);
}