function rate_ui_widget_form_step_descriptions in Rate 7.2
Generate form fields for the thirth step in the rate widget form.
1 call to rate_ui_widget_form_step_descriptions()
- rate_ui_widget_form in ui/
rate_ui.form.inc - Implements hook_form().
File
- ui/
rate_ui.form.inc, line 233 - This file contains the differtent Rate UI forms.
Code
function rate_ui_widget_form_step_descriptions($form, &$form_state, $widget_type = NULL) {
$form['descriptions'] = array(
'#type' => 'fieldset',
'#title' => t('Descriptions'),
'#collapsible' => FALSE,
);
$form['descriptions']['desc_norating'] = array(
'#type' => 'textfield',
'#title' => t('No rating'),
'#default_value' => isset($form_state['storage']['desc_norating']) ? $form_state['storage']['desc_norating'] : 'No one voted',
);
$form['descriptions']['desc_notvoted'] = array(
'#type' => 'textfield',
'#title' => t('Not voted'),
'#default_value' => isset($form_state['storage']['desc_notvoted']) ? $form_state['storage']['desc_notvoted'] : 'Average rating: @rating',
);
$form['descriptions']['desc_voted'] = array(
'#type' => 'textfield',
'#title' => t('Already voted'),
'#default_value' => isset($form_state['storage']['desc_voted']) ? $form_state['storage']['desc_voted'] : 'You voted @vote',
);
$form['descriptions']['desc_justvoted'] = array(
'#type' => 'textfield',
'#title' => t('Just voted'),
'#default_value' => isset($form_state['storage']['desc_justvoted']) ? $form_state['storage']['desc_justvoted'] : 'Thank you for your vote!',
);
$form['descriptions']['desc_mouseover'] = array(
'#type' => 'textfield',
'#title' => t('On mouse over'),
'#default_value' => isset($form_state['storage']['desc_mouseover']) ? $form_state['storage']['desc_mouseover'] : '',
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['previous'] = array(
'#type' => 'submit',
'#value' => t('Previous'),
);
$form['actions']['next'] = array(
'#type' => 'submit',
'#value' => t('Next'),
);
return $form;
}