You are here

public function WebformEntityAjaxFormTrait::buildForm in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Form/WebformEntityAjaxFormTrait.php \Drupal\webform\Form\WebformEntityAjaxFormTrait::buildForm()
1 method overrides WebformEntityAjaxFormTrait::buildForm()
WebformUiEntityElementsForm::buildForm in modules/webform_ui/src/WebformUiEntityElementsForm.php
Form constructor.

File

src/Form/WebformEntityAjaxFormTrait.php, line 68

Class

WebformEntityAjaxFormTrait
Trait class for Webform Ajax support.

Namespace

Drupal\webform\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  if ($this
    ->isDialogDisabled()) {
    return $form;
  }
  else {
    return $this
      ->buildAjaxForm($form, $form_state);
  }
}