function webform_help in Webform 6.2
Same name and namespace in other branches
- 8.5 webform.module \webform_help()
- 5.2 webform.module \webform_help()
- 5 webform.module \webform_help()
- 6.3 webform.module \webform_help()
- 7.4 webform.module \webform_help()
- 7.3 webform.module \webform_help()
- 6.x webform.module \webform_help()
Implementation of hook_help().
File
- ./
webform.module, line 17
Code
function webform_help($section = 'admin/help#webform', $arg = NULL) {
$output = '';
switch ($section) {
case 'admin/settings/webform':
$output = t('Webforms are forms and questionnaires. To add one, select <a href="!url">Create content -> Webform</a>.', array(
'!url' => url('node/add/webform'),
));
break;
case 'admin/help#webform':
$output = t("<p>This module lets you create forms or questionnaires and define their content. Submissions from these forms are stored in the database and optionally also sent by e-mail to a predefined address.</p>\n <p>Here is how to create one:</p>\n <ul>\n <li>Go to Create Content and add a webform</li>\n <li>Add a description to be displayed as a teaser and above the actual form.</li>\n <li>Add a confirmation message or redirect node that is to be displayed after successful submission.</li>\n <li>Add one or more components to your form.</li>\n <li>Optionally add an e-mail address to which submissions will be sent. If no email address is specified, no e-mail will be sent when submissions are made through the form.</li>\n <li>Optionally select an e-mail (or hidden) component that will be used to populate the return e-mail address on any sent e-mail.</li>\n <li>Optionally select a textfield (or hidden) component that will be used to populate the subject e-mail field on any sent e-mail.</li>\n </ul>\n <p>Help on adding and configuring the components will be shown after you add your first component.</p>\n <p>The content of submitted forms is stored in the database table <i>webform_submitted_data</i> as key-value pairs.</p>\n ");
break;
case 'node/add#webform':
$output = t('A webform can be a questionnaires, contact or request forms. It can be used to let visitors make contact, register for a event or to enable a complex survey.');
break;
case 'node/%/edit/components':
$output .= '<p>' . t('This page displays all the components currently configured for this webform node. You may add any number of components to the form, even multiple of the same type. To add a new component, fill in a name and select a type from the fields at the bottom of the table. Submit the form to create the new component or update any changed form values.') . '</p>';
$output .= '<p>' . t('Click on any existing component\'s name to edit its settings.') . '</p>';
break;
}
if (strstr($section, 'admin/settings/webform#')) {
// Call help hooks in plugins:
$components = webform_load_components(TRUE);
foreach ($components as $key => $component) {
$help_function = '_webform_help_' . $key;
if (function_exists($help_function)) {
$output .= $help_function($section);
}
}
}
return $output;
}