You are here

public function YamlFormTableTrait::form in YAML Form 8

File

src/Plugin/YamlFormElement/YamlFormTableTrait.php, line 59

Class

YamlFormTableTrait
Provides a 'table' trait.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['options']['js_select'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Select all'),
    '#description' => $this
      ->t('If checked, a select all checkbox will be added to the header.'),
    '#return_value' => TRUE,
  ];
  return $form;
}