1 entityreference.module | _entityreference_element_validate_filter(&$element, &$form_state) |
Helper function to remove blank elements.
File
- core/
modules/ entityreference/ entityreference.module, line 502 - Entityreference primary module file.
Code
function _entityreference_element_validate_filter(&$element, &$form_state) {
$element['#value'] = array_filter($element['#value']);
form_set_value($element, $element['#value'], $form_state);
}