function entityreference_field_settings_form in Entity reference 8
Same name and namespace in other branches
- 7 entityreference.module \entityreference_field_settings_form()
Implements hook_field_settings_form().
The field settings infrastructure is not AJAX enabled by default, because it doesn't pass over the $form_state. Build the whole form into a #process in which we actually have access to the form state.
File
- ./
entityreference.module, line 168 - Provides a field that can reference other entities.
Code
function entityreference_field_settings_form($field, $instance, $has_data) {
$form = array(
'#type' => 'container',
'#attached' => array(
'css' => array(
drupal_get_path('module', 'entityreference') . '/css/entityreference.admin.css',
),
),
'#process' => array(
'_entityreference_field_settings_process',
'_entityreference_field_settings_ajax_process',
),
'#element_validate' => array(
'_entityreference_field_settings_validate',
),
'#field' => $field,
'#instance' => $instance,
'#has_data' => $has_data,
);
return $form;
}