You are here

function webform_help in Webform 5

Same name and namespace in other branches
  1. 8.5 webform.module \webform_help()
  2. 5.2 webform.module \webform_help()
  3. 6.3 webform.module \webform_help()
  4. 6.2 webform.module \webform_help()
  5. 7.4 webform.module \webform_help()
  6. 7.3 webform.module \webform_help()
  7. 6.x webform.module \webform_help()

Implemenation of hook_help().

8 calls to webform_help()
webform_edit_field_form in ./webform.module
_webform_edit_date in components/date.inc
Create a set of form items to be displayed on the form for editing this component. Use care naming the form items, as this correlates directly to the database schema. The component "Name" and "Description" fields are added to every…
_webform_edit_grid in components/grid.inc
Create a set of form items to be displayed on the form for editing this component. Use care naming the form items, as this correlates directly to the database schema. The component "Name" and "Description" fields are added to every…
_webform_edit_hidden in components/hidden.inc
Create a set of form items to be displayed on the form for editing this component. Use care naming the form items, as this correlates directly to the database schema. The component "Name" and "Description" fields are added to every…
_webform_edit_markup in components/markup.inc
Create a set of form items to be displayed on the form for editing this component. Use care naming the form items, as this correlates directly to the database schema. The component "Name" and "Description" fields are added to every…

... See full list

File

./webform.module, line 17

Code

function webform_help($section = "admin/help#webform") {
  $output = "";
  switch ($section) {
    case 'admin/settings/webform':
      $output = t("Webforms are forms and questionnaires. To add one select <strong>create content -&gt; webform</strong>. Below you can set different security and debug options.");
      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 'webform/helptext#variables':
      $output = t('Available variables are: %username, %useremail, %site, %date.');
      $output .= ' ' . t('You can also use %server[key] to add any of the special PHP <a href="http://www.php.net/reserved.variables#reserved.variables.server">$_SERVER</a> variables, %session[key] to add any of the special PHP <a href="http://www.php.net/reserved.variables#reserved.variables.session">$_SESSION</a> variables and %get[key] to create prefilled forms from the <a href="http://www.php.net/reserved.variables#reserved.variables.get">URL</a>. %cookie, %request and %post also work with their respective PHP variables. For example %server[HTTP_USER_AGENT], %session[id], or %get[q].');
      if (module_exists('profile')) {
        $output .= ' ' . t('If you are using the profiles module, you can also access all profile data using the syntax %profile[form_name]. If you for example have a profile value named profile_city, add the varible %profile[profile_city].');
      }
      break;
  }
  if (strstr($section, 'admin/settings/webform#')) {

    // Call help hooks in plugins:
    $components = _webform_load_components(TRUE);
    foreach ($components as $component) {
      $help_function = "_webform_help_" . $component;
      if (function_exists($help_function)) {
        $output .= $help_function($section);
      }
    }
  }
  return $output;
}