diff --git a/src/Entity/FillPdfFormField.php b/src/Entity/FillPdfFormField.php index bdc9c61d1175892a2174cf3d1b2e8f989c4315bd..10847e905219b8658c0383ac20fe22815d5a113b 100644 --- a/src/Entity/FillPdfFormField.php +++ b/src/Entity/FillPdfFormField.php @@ -78,7 +78,7 @@ class FillPdfFormField extends ContentEntityBase implements FillPdfFormFieldInte $fields['value'] = BaseFieldDefinition::create('string_long') ->setLabel(t('Fill pattern')) - ->setDescription(t('Text and tokens with which to fill in the PDF.')) + ->setDescription(t('Text and tokens with which to fill in the PDF. This field supports tokens.')) ->setDisplayOptions('form', [ 'type' => 'string_long', 'weight' => 0, diff --git a/src/Form/FillPdfFormFieldForm.php b/src/Form/FillPdfFormFieldForm.php index dc65f034564e5784033c336e11cfb10e3fe69c7c..bd8b0bbb398647ac199f802a25c7ac8f8f96cc3d 100644 --- a/src/Form/FillPdfFormFieldForm.php +++ b/src/Form/FillPdfFormFieldForm.php @@ -49,7 +49,17 @@ class FillPdfFormFieldForm extends ContentEntityForm { public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); - $form['token_help'] = $this->adminFormHelper->getAdminTokenForm(); + $form['prefix']['widget']['0']['value']['#rows'] = 3; + + $form['value']['token_help'] = $this->adminFormHelper->getAdminTokenForm(); + + $form['suffix']['widget']['0']['value']['#rows'] = 3; + + $form['extra'] = [ + '#type' => 'details', + '#title' => $this->t('Transform values'), + ]; + $form['replacements']['#group'] = 'extra'; return $form; }