function random_captcha_type_settings_form in CAPTCHA Pack 7
Same name and namespace in other branches
- 5 random_captcha_type/random_captcha_type.module \random_captcha_type_settings_form()
- 6 random_captcha_type/random_captcha_type.admin.inc \random_captcha_type_settings_form()
Configuration form
1 string reference to 'random_captcha_type_settings_form'
- random_captcha_type_menu in random_captcha_type/
random_captcha_type.module - Implements hook_menu().
File
- random_captcha_type/
random_captcha_type.admin.inc, line 11 - Functionality and helper functions for RANDOM CAPTCHA administration.
Code
function random_captcha_type_settings_form() {
$enabled_types = _random_captcha_type_get_enabled_types();
if (count($enabled_types) < 2) {
drupal_set_message(t('You need at least two CAPTCHA types (other than %random_captcha_type).', array(
'%random_captcha_type' => 'Random CAPTCHA type',
)), 'error');
}
$form = array();
$captcha_types = _random_captcha_type_get_all_types();
$form['random_captcha_type_enabled_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Randomly switch between'),
'#options' => $captcha_types,
'#default_value' => $enabled_types,
);
return system_settings_form($form);
}