You are here

function webform_content_creator_help in Webform Content Creator 2.x

Same name and namespace in other branches
  1. 8 webform_content_creator.module \webform_content_creator_help()
  2. 3.x webform_content_creator.module \webform_content_creator_help()

Implements hook_help().

File

./webform_content_creator.module, line 104
Allows to call functions after creating/editing/deleting webform submissions.

Code

function webform_content_creator_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.webform_content_creator':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Webform Content Creator provides the ability to create content entities after submitting webforms, and to have mappings between the fields of the created content entity and webform submission values. It is possible to trigger the creation of a content entity (configurable content type id and content field values) after submitting a Webform (configurable webform entity id). Moreover, you can map the content field values according to webform submission values (tokens can be used) and/or custom values.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<p>' . t('In order to use this module, you should follow these steps:') . '</p>';
      $output .= '<ol>  ';
      $output .= '<li>' . t('Enable Webform Content Creator module;') . '</li>';
      $output .= '<li>' . t('Go to Webform Content Creator configuration page; (/admin/config/webform_content_creator);') . '</li>';
      $output .= '<li>' . t('Click on "Add configuration";') . '</li>';
      $output .= '<li>' . t('Give a title to Webform Content Creator entity and choose a Webform and a Content Type, in order to have mappings between Webform submission values and content field values, and then click on "Save";') . '</li>';
      $output .= '<li>' . t('In the configuration page (/admin/config/webform_content_creator), click on "Manage fields" on the entity you have just created;') . '</li>';
      $output .= '<li>' . t('In the "Title" input, you can give a title to the content that is created after submitting the Webform (tokens may be used);') . '</li>';
      $output .= '<li>' . t('After that, you have the possibility to choose the Content fields used in the mapping;') . '</li>';
      $output .= '<li>' . t('When choosing a Content field (checkbox on the left side of each field name), a Webform field can be chosen to match with this Content field (optionally, you can provide a custom text instead, using available tokens).') . '</li>';
      $output .= '</ol>';
      return $output;
  }
}