You are here

function webform_process_states in Webform 8.5

Adds JavaScript to change the state of an element based on another element.

Parameters

array $elements: A renderable array element having a #states property as described above.

string $key: The element property to add the states attribute to.

Deprecated

Scheduled for removal in Webform 8.x-6.x Use \Drupal\Core\Form\FormHelper::processStates instead.

8 calls to webform_process_states()
WebformCompositeFormElementTrait::preRenderWebformCompositeFormElement in src/Element/WebformCompositeFormElementTrait.php
Adds form element theming to an element if its title or description is set.
WebformElementOptions::processWebformElementOptions in src/Element/WebformElementOptions.php
Processes a webform element options element.
WebformHtmlEditor::processWebformHtmlEditor in src/Element/WebformHtmlEditor.php
Prepares a #type 'webform_html_editor' render element for input.html.twig.
WebformImageSelectElementImages::processWebformImageSelectElementImages in modules/webform_image_select/src/Element/WebformImageSelectElementImages.php
Processes a webform element image select images element.
WebformMapping::processWebformMapping in src/Element/WebformMapping.php
Processes a likert scale webform element.

... See full list

File

./webform.module, line 907
Enables the creation of webforms and questionnaires.

Code

function webform_process_states(array &$elements, $key = '#attributes') {
  WebformFormHelper::processStates($elements, $key);
}