function references_dialog_settings_form in References dialog 7
A widget settings form for our references dialog fields.
1 call to references_dialog_settings_form()
File
- ./
references_dialog.module, line 352 - This the main module file.
Code
function references_dialog_settings_form($field, $instance) {
$widget = $instance['widget'];
$defaults = field_info_widget_settings($widget['type']);
$settings = array_merge($defaults, $widget['settings']);
$dialog_widget = references_dialog_widget_load($widget['type']);
// Add our own additions.
foreach ($dialog_widget['operations'] as $operation => $dialog_settings) {
$form['references_dialog_' . $operation] = array(
'#type' => 'checkbox',
'#title' => check_plain($dialog_settings['title']),
'#default_value' => isset($settings['references_dialog_' . $operation]) ? $settings['references_dialog_' . $operation] : FALSE,
);
}
return $form;
}