function webform_hints_admin_settings in Webform Hints 6
Same name and namespace in other branches
- 7 webform_hints.admin.inc \webform_hints_admin_settings()
Menu callback; displays the Webform hints module settings page.
See also
webform_hints_admin_settings_submit()
1 string reference to 'webform_hints_admin_settings'
- webform_hints_menu in ./
webform_hints.module - Implementation of hook_menu().
File
- ./
webform_hints.admin.inc, line 14 - Admin page callbacks for the Webform Hints module.
Code
function webform_hints_admin_settings(&$form_state) {
// Query the database for all webform nodes.
$options = array();
$result = db_query('SELECT w.nid, n.title FROM webform w, node n WHERE w.nid = n.nid');
while ($webform = db_fetch_object($result)) {
// dsm($webform);
$options[$webform->nid] = $webform->title;
}
// Build checkbox list of results with ability to apply/remove Webform Hints.
$form['webform_hints_forms'] = array(
'#type' => 'checkboxes',
'#title' => t('Webforms'),
'#default_value' => variable_get('webform_hints_forms', array()),
'#options' => $options,
'#description' => t('Select the webform nodes you would like to apply the "Webform Hints" effect to. On the selected nodes, the titles of textfields, textareas, and email fields will appear as placeholder text within the respective fields. The labels of these fields will be visible only to screenreaders.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}