You are here

public static function WebformSubmissionConditionsValidator::getSelectorInputName in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionConditionsValidator.php \Drupal\webform\WebformSubmissionConditionsValidator::getSelectorInputName()

Get input name from CSS :input[name="*"] selector.

Parameters

string $selector: A CSS :input[name="*"] selector.

Return value

string|null The input name or NULL if selector can not be parsed

10 calls to WebformSubmissionConditionsValidator::getSelectorInputName()
Checkboxes::getElementSelectorInputValue in src/Plugin/WebformElement/Checkboxes.php
Get an element's (sub)input selector value.
DateList::getElementSelectorInputValue in src/Plugin/WebformElement/DateList.php
Get an element's (sub)input selector value.
DateTime::getElementSelectorInputValue in src/Plugin/WebformElement/DateTime.php
Get an element's (sub)input selector value.
OptionsBase::getElementSelectorInputValue in src/Plugin/WebformElement/OptionsBase.php
Get an element's (sub)input selector value.
WebformCheckboxesOther::getElementSelectorInputValue in src/Plugin/WebformElement/WebformCheckboxesOther.php
Get an element's (sub)input selector value.

... See full list

File

src/WebformSubmissionConditionsValidator.php, line 1111

Class

WebformSubmissionConditionsValidator
Webform submission conditions (#states) validator.

Namespace

Drupal\webform

Code

public static function getSelectorInputName($selector) {
  return preg_match('/\\:input\\[name="([^"]+)"\\]/', $selector, $match) ? $match[1] : NULL;
}