function voting_rules_action_cast_vote_form in Voting Rules 6
Set Votes Action Configuration Form
3 calls to voting_rules_action_cast_vote_form()
- voting_rules_action_cast_vote_comment_form in ./
voting_rules.content-types.inc - Set Votes Action Configuration Form for nodes
- voting_rules_action_cast_vote_node_form in ./
voting_rules.content-types.inc - Set Votes Action Configuration Form for nodes
- voting_rules_action_cast_vote_user_form in ./
voting_rules.content-types.inc - Set Votes Action Configuration Form for users
File
- ./
voting_rules.rules.inc, line 337 - Provides Rules integration for the Votingapi module
Code
function voting_rules_action_cast_vote_form($settings, &$form) {
$form['settings']['vote_value_type'] = array(
'#title' => t("Vote value type"),
'#type' => 'textfield',
'#default_value' => $settings['vote_value_type'] ? $settings['vote_value_type'] : 'percent',
'#required' => TRUE,
'#description' => t("i.e. 'percent', 'points'"),
);
$form['settings']['vote_value'] = array(
'#title' => t("Vote value"),
'#type' => 'textfield',
'#default_value' => $settings['vote_value'],
'#required' => TRUE,
);
$form['settings']['vote_tag'] = array(
'#title' => t("Tag"),
'#type' => 'textfield',
'#default_value' => $settings['vote_tag'] ? $settings['vote_tag'] : 'vote',
'#required' => TRUE,
);
$form['settings']['vote_uid'] = array(
'#title' => t("User Id casting the vote"),
'#type' => 'textfield',
'#default_value' => $settings['vote_uid'],
'#description' => t("Use 'current' for uid of current user when event occurs"),
);
}