You are here

public function FillPdfFormImportForm::form in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x src/Form/FillPdfFormImportForm.php \Drupal\fillpdf\Form\FillPdfFormImportForm::form()

Gets the actual form array to be built.

Overrides EntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/Form/FillPdfFormImportForm.php, line 44

Class

FillPdfFormImportForm
Form controller for the FillPdfForm import form.

Namespace

Drupal\fillpdf\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['paste'] = [
    '#type' => 'details',
    '#title' => $this
      ->t('Paste code'),
    '#open' => TRUE,
  ];
  $form['paste']['code'] = [
    '#type' => 'textarea',
    '#default_value' => '',
    '#rows' => 30,
    '#description' => $this
      ->t('Cut and paste the results of a <em>FillPDF configuration and mappings export</em> here.'),
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Import'),
  ];
  return $form;
}