public function WebformCustomComposite::form in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformCustomComposite.php \Drupal\webform\Plugin\WebformElement\WebformCustomComposite::form()
Gets the actual configuration webform array to be built.
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 An associative array contain the element's configuration webform without any default values.
Overrides WebformCompositeBase::form
File
- src/
Plugin/ WebformElement/ WebformCustomComposite.php, line 140
Class
- WebformCustomComposite
- Provides a custom composite element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
// Always to should multiple element settings since WebformComposite
// extends WebformMultiple.
unset($form['multiple']['#states']);
return $form;
}