function backgroundfield_field_settings_form in BackgroundField 6
Same name and namespace in other branches
- 7 backgroundfield.module \backgroundfield_field_settings_form()
1 call to backgroundfield_field_settings_form()
File
- ./
backgroundfield_field.inc, line 6
Code
function backgroundfield_field_settings_form($field) {
$form['css_selector'] = array(
'#type' => 'textfield',
'#title' => t('CSS Selector'),
'#default_value' => $field['css_selector'] ? $field['css_selector'] : 'body',
'#description' => t('Enter a CSS selector to select the page element(s) to apply the background image. For example: .content'),
'#required' => TRUE,
);
$form['repeat'] = array(
'#type' => 'radios',
'#title' => t('Repeat'),
'#default_value' => $field['repeat'] ? $field['repeat'] : 'repeat',
'#options' => array(
'repeat' => t('Repeat'),
'repeat-x' => t('Repeat Horizontally'),
'repeat-y' => t('Repeat Vertically'),
'no-repeat' => t('No Repeat'),
),
'#required' => TRUE,
);
$form['h_position'] = array(
'#type' => 'radios',
'#title' => t('Horizontal Position'),
'#default_value' => $field['h_position'] ? $field['h_position'] : 'left',
'#options' => array(
'left' => t('Left'),
'center' => t('Center'),
'right' => t('Right'),
),
'#required' => TRUE,
);
$form['v_position'] = array(
'#type' => 'radios',
'#title' => t('Vertical Position'),
'#default_value' => $field['v_position'] ? $field['v_position'] : 'top',
'#options' => array(
'top' => t('Top'),
'center' => t('Center'),
'bottom' => t('Bottom'),
),
'#required' => TRUE,
);
$form['attachment'] = array(
'#type' => 'radios',
'#title' => t('Attachment'),
'#default_value' => $field['attachment'] ? $field['attachment'] : 'scroll',
'#options' => array(
'scroll' => t('Scroll'),
'fixed' => t('Fixed'),
),
'#required' => TRUE,
);
return $form;
}