function markup_widget_settings in Markup 6
Implements hook_widget_settings().
File
- ./
markup.module, line 89 - Defines a field type for displaying markup on the node/edit form.
Code
function markup_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$form['display_style'] = array(
'#type' => 'radios',
'#title' => t('Display Style'),
'#default_value' => !empty($widget['display_style']) ? $widget['display_style'] : '',
'#options' => array(
'none' => t('Hide Field Wrapper & Label'),
'wrapper' => t('Display Field Wrapper & Hide Label'),
'all' => t('Display Field Wrapper & Label'),
),
'#required' => TRUE,
'#description' => t('Choose how the markup field should be displayed on the node form.') . '<br />' . htmlentities(t('A field wrapper consists of a <div class="form-item"></div> wrapper around the markup to follow form standards.')),
);
return $form;
case 'save':
return array(
'display_style',
);
}
}