You are here

function conditional_fields_field_get_values in Conditional Fields 7.3

Extracts field values from a field element of a submitted form.

Return value

The requested field values parent. Actual field vales are stored under the key $element['#field_name'].

2 calls to conditional_fields_field_get_values()
conditional_fields_field_form_get_values in ./conditional_fields.module
Extracts field values from a submitted form.
conditional_fields_form_validate in ./conditional_fields.module
Validation callback for any form with conditional fields.

File

./conditional_fields.module, line 723
Define dependencies between fields based on their states and values.

Code

function conditional_fields_field_get_values($element, $form_state) {

  // Fall back to #parents to support custom dependencies.
  $parents = !empty($element['#field_parents']) ? $element['#field_parents'] : $element['#parents'];
  return drupal_array_get_nested_value($form_state['values'], $parents);
}