You are here

public function CampaignMonitorUserAdminForm::buildForm in Campaign Monitor 8

Same name and namespace in other branches
  1. 8.2 modules/campaignmonitor_user/src/Form/CampaignMonitorUserAdminForm.php \Drupal\campaignmonitor_user\Form\CampaignMonitorUserAdminForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfigFormBase::buildForm

File

modules/campaignmonitor_user/src/Form/CampaignMonitorUserAdminForm.php, line 30

Class

CampaignMonitorUserAdminForm
Configure campaignmonitor settings for this site.

Namespace

Drupal\campaignmonitor_user\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('campaignmonitor_user.settings');
  $form['subscription_heading'] = [
    '#type' => 'textfield',
    '#title' => t('Subscription Heading'),
    '#description' => t('The heading of the page'),
    '#default_value' => $config
      ->get('subscription_heading'),
  ];
  $form['subscription_text'] = [
    '#type' => 'textarea',
    '#title' => t('List Heading'),
    '#description' => t('The text below the Subscription heading'),
    '#default_value' => $config
      ->get('subscription_text'),
  ];
  $form['list_heading'] = [
    '#type' => 'textarea',
    '#title' => t('List Heading'),
    '#description' => t('The heading above the lists on the subscription form'),
    '#default_value' => $config
      ->get('list_heading'),
  ];
  return parent::buildForm($form, $form_state);
}