function advpoll_ranking_install in Advanced Poll 7.2
Same name and namespace in other branches
- 7.3 advpoll_ranking/advpoll_ranking.install \advpoll_ranking_install()
- 7 advpoll_ranking/advpoll_ranking.install \advpoll_ranking_install()
File
- advpoll_ranking/
advpoll_ranking.install, line 51 - Install file for Advanced Ranking Poll
Code
function advpoll_ranking_install() {
// fetch the t function for use in install
$t = get_t();
// Add borda and run-off to allow ranking-style display and voting.
$field = array(
'field_name' => 'advpoll_behavior',
'settings' => array(
'allowed_values' => array(
'approval' => $t('Approval voting'),
'pool' => $t('Pool votes and choices'),
'borda' => $t('Borda count (Ranking Poll)'),
'runoff' => $t('Instant-runoff (Ranking Poll)'),
),
'allowed_values_function' => '',
),
);
field_update_field($field);
}