function votingapi_generate_votes_form in Voting API 7.3
Same name and namespace in other branches
- 5 votingapi_generate.module \votingapi_generate_votes_form()
- 6.2 votingapi.admin.inc \votingapi_generate_votes_form()
- 7.2 votingapi.admin.inc \votingapi_generate_votes_form()
Developer tool to generate dummy votes.
1 string reference to 'votingapi_generate_votes_form'
- votingapi_menu in ./
votingapi.module - Implements of hook_menu().
File
- ./
votingapi.admin.inc, line 48 - Configuration forms and helper functions for VotingAPI module.
Code
function votingapi_generate_votes_form() {
$form['node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Which node types should receive votes?'),
'#options' => node_type_get_names(),
'#default_value' => array_keys(node_type_get_names()),
);
$form['vote_type'] = array(
'#type' => 'select',
'#title' => t('What type of votes should be generated?'),
'#options' => array(
'percent' => t('Percentage (Fivestar style)'),
'points' => t('Point-based (Digg style)'),
),
'#default_value' => 'percent',
);
$form['kill_votes'] = array(
'#type' => 'checkbox',
'#title' => t('Delete existing votes before generating new ones.'),
'#default_value' => FALSE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Do it!'),
);
return $form;
}