function ajax_form_entity_field_collection_field_formatter_settings_form in Ajax form entity 7
Same name and namespace in other branches
- 7.x ajax_form_entity_field_collection/ajax_form_entity_field_collection.module \ajax_form_entity_field_collection_field_formatter_settings_form()
Implements hook_field_formatter_settings_form().
File
- ajax_form_entity_field_collection/
ajax_form_entity_field_collection.module, line 45 - Provide formatter for ajax add / edition field collection.
Code
function ajax_form_entity_field_collection_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
if ($instance['display'][$view_mode]['type'] == 'ajax_field_collection') {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$element = array();
$element['close_form_display'] = array(
'#title' => t('Display close Button at the top of the form'),
'#type' => 'select',
'#options' => array(
0 => t('No'),
1 => t('Yes'),
),
'#default_value' => $settings['close_form_display'],
'#required' => TRUE,
);
}
return $element;
}