function optimizely_setup_form in Optimizely 6
Same name and namespace in other branches
- 7 optimizely.module \optimizely_setup_form()
Settings form
1 string reference to 'optimizely_setup_form'
- optimizely_menu in ./
optimizely.module - Implements hook_menu().
File
- ./
optimizely.module, line 60 - Optimizely module
Code
function optimizely_setup_form($form_state) {
$form['introduction'] = array(
'#type' => 'markup',
'#markup' => '<p>' . t('In order to use this module, you need an <a href="@url">Optimizely</a> account. A Free 30 day trial account is available.', array(
'@url' => url('http://www.optimizely.com/'),
)) . '</p><p>' . t('Most of the configuration and setup for the A/B and other tests is done by logging into your account on the Optimizely website.') . '</p>',
);
$form['optimizely_onoff'] = array(
'#type' => 'radios',
'#title' => t('Enable Optimizely'),
'#description' => t('To start using Optimizely, this setting must be enabled. This setting can be used to globally disable Optimizely from working on your site without disabling yours tests on the Optimizely website.'),
'#default_value' => variable_get('optimizely_onoff', 'on'),
'#options' => array(
'off' => 'Disabled',
'on' => 'Enabled',
),
);
$form['optimizely_id'] = array(
'#type' => 'textfield',
'#title' => t('Optimizely ID Number'),
'#default_value' => variable_get('optimizely_id', 'NONE'),
'#description' => t('Your numeric account ID. This is the number after <q>/js/</q> in the Optimizely Tracking Code.'),
'#size' => 15,
'#maxlength' => 20,
'#required' => TRUE,
);
return system_settings_form($form);
}