public function PasswordConfirm::form in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/PasswordConfirm.php \Drupal\webform\Plugin\WebformElement\PasswordConfirm::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 WebformElementBase::form
File
- src/
Plugin/ WebformElement/ PasswordConfirm.php, line 96
Class
- PasswordConfirm
- Provides a 'password_confirm' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
// Remove unsupported title and description display from composite elements.
if ($this
->isComposite()) {
unset($form['form']['display_container']['title_display']['#options']['inline']);
unset($form['form']['display_container']['description_display']['#options']['tooltip']);
}
return $form;
}