function _views_customfield_option_process in Views Custom Field 5
The #process takes the serialized #default_value and feeds the forms beneath it.
Parameters
array $element:
Return value
array
File
- ./
views_customfield.module, line 63
Code
function _views_customfield_option_process($element) {
$values = unserialize($element['#default_value']);
if (!is_array($values)) {
// set default values for options that have no stored value.
$values = array(
'value' => '',
);
}
$element['value']['#default_value'] = $values['value'];
return $element;
}