You are here

public function WebformEntityAjaxFormTrait::buildForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 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 for webform entity 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);
  }
}