function conditional_fields_states in Conditional Fields 7.3
Builds a list of supported states that may be applied to a dependent field.
3 calls to conditional_fields_states()
- conditional_fields_dependency_add_form in includes/
conditional_fields.admin.inc - Dependency add form.
- conditional_fields_dependency_description in ./
conditional_fields.module - Build a textual description of a dependency
- conditional_fields_dependency_edit_form in includes/
conditional_fields.admin.inc - Dependency edit form.
File
- ./
conditional_fields.module, line 1474 - Define dependencies between fields based on their states and values.
Code
function conditional_fields_states() {
$states = array(
// Supported by States API
'visible' => t('Visible'),
'!visible' => t('Invisible'),
'!empty' => t('Filled with a value'),
'empty' => t('Emptied'),
'!disabled' => t('Enabled'),
'disabled' => t('Disabled'),
'checked' => t('Checked'),
'!checked' => t('Unchecked'),
'required' => t('Required'),
'!required' => t('Optional'),
'!collapsed' => t('Expanded'),
'collapsed' => t('Collapsed'),
// Supported by Conditional Fields
'unchanged' => t('Unchanged (no state)'),
);
// Allow other modules to modify the states
drupal_alter('conditional_fields_states', $states);
return $states;
}