You are here

public function AbjsTestForm::abjsAjaxAddExperience in A/B Test JS 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/AbjsTestForm.php \Drupal\abjs\Form\AbjsTestForm::abjsAjaxAddExperience()

Adds experience select fields and fractions to AbjsTestForm.

File

src/Form/AbjsTestForm.php, line 354

Class

AbjsTestForm
Class for build form test.

Namespace

Drupal\abjs\Form

Code

public function abjsAjaxAddExperience(array $form, FormStateInterface $form_state) {
  $form_state
    ->set('num_experiences', $form_state
    ->get('num_experiences') + 1);
  $form_state
    ->setRebuild();
}