function _fences_form_field_ui_field_edit_form_alter in Fences 7
Same name and namespace in other branches
- 7.2 fences.admin.inc \_fences_form_field_ui_field_edit_form_alter()
Implements hook_form_FORM_ID_alter().
1 call to _fences_form_field_ui_field_edit_form_alter()
- fences_form_field_ui_field_edit_form_alter in ./
fences.module - Implements hook_form_FORM_ID_alter().
File
- ./
fences.admin.inc, line 219 - Functions only needed on configuration pages.
Code
function _fences_form_field_ui_field_edit_form_alter(&$form, &$form_state) {
$suggestion = fences_get_suggestion($form['#instance']['entity_type'], $form['#instance']['bundle'], $form['#instance']['field_name']);
// Make the default markup selection match the Fences default markup setting.
$default_markup = variable_get('fences_default_markup', 0) ? 'div' : 'div_div_div';
$form['instance']['fences_wrapper'] = array(
'#type' => 'select',
'#title' => t('Wrapper markup'),
'#default_value' => $suggestion ? $suggestion : $default_markup,
'#options' => fences_get_fences_options('field'),
'#description' => t('Choose the HTML to use to wrap the field.'),
);
}