You are here

public function DefaultValue::buildConfigurationForm in Pardot Integration 2.x

File

src/Plugin/PardotFormMapFormatterPlugin/DefaultValue.php, line 66

Class

DefaultValue
Plugin to select from the list of fields.

Namespace

Drupal\pardot\Plugin\PardotFormMapFormatterPlugin

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form['fields'] = [
    '#type' => 'select',
    '#title' => 'Fields',
    '#default_value' => $this->configuration['fields'],
    '#options' => $this
      ->getContactFormFieldCollection(),
    '#required' => TRUE,
  ];
  return $form;
}