function ds_shared_form_validate in Display Suite 7
Same name and namespace in other branches
- 7.2 modules/ds_ui/includes/ds.fields.inc \ds_shared_form_validate()
Shared field form validation.
1 string reference to 'ds_shared_form_validate'
- ds_shared_form in ./
ds.fields.inc - Shared form for all all fields.
File
- ./
ds.fields.inc, line 196 - Administrative functions for managing custom fields for every entity.
Code
function ds_shared_form_validate($form, &$form_state) {
$field = new stdClass();
$field->properties = array();
$field->field = $form_state['values']['field'];
$field->label = $form_state['values']['name'];
$entities = $form_state['values']['entities'];
foreach ($entities as $key => $value) {
if ($key !== $value) {
unset($entities[$key]);
}
}
$field->entities = $entities;
$form_state['field'] = $field;
}