You are here

public function ConditionalFieldsFormHelper::buildJquerySelectorForField in Conditional Fields 4.x

Build a jQuery selector for a field, from its name or ID attribute.

A mockable wrapper around conditional_fields_field_selector().

Parameters

array $field: A form array for the field we want to build a selector for.

Return value

false|string A jQuery selector; or FALSE if one cannot be determined.

2 calls to ConditionalFieldsFormHelper::buildJquerySelectorForField()
ConditionalFieldsFormHelper::getSelector in src/ConditionalFieldsFormHelper.php
Build a jQuery selector if it was not overridden by a custom value.
ConditionalFieldsFormHelper::processDependeeFields in src/ConditionalFieldsFormHelper.php
Determine and register dependee field effects.

File

src/ConditionalFieldsFormHelper.php, line 898

Class

ConditionalFieldsFormHelper
Helper to interact with forms.

Namespace

Drupal\conditional_fields

Code

public function buildJquerySelectorForField(array $field) {
  return conditional_fields_field_selector($field);
}