public function YamlFormCheckboxesOther::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 Checkboxes::prepare
File
- src/
Plugin/ YamlFormElement/ YamlFormCheckboxesOther.php, line 29
Class
- YamlFormCheckboxesOther
- Provides a 'checkboxes_other' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function prepare(array &$element, YamlFormSubmissionInterface $yamlform_submission) {
parent::prepare($element, $yamlform_submission);
$element['#element_validate'][] = [
get_class($this),
'validateMultipleOptions',
];
}