public function YamlFormSignature::prepare in YAML Form 8
Prepare an element to be rendered within a form.
Parameters
array $element: An element.
\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: A form submission.
Overrides YamlFormElementBase::prepare
File
- src/
Plugin/ YamlFormElement/ YamlFormSignature.php, line 34
Class
- YamlFormSignature
- Provides a 'signature' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function prepare(array &$element, YamlFormSubmissionInterface $yamlform_submission) {
if (empty($element['#description'])) {
$element['#description'] = $this
->t('Sign above');
}
parent::prepare($element, $yamlform_submission);
}