You are here

function hubspot_webform_help in HubSpot 7.3

Same name and namespace in other branches
  1. 7.2 hubspot_webform/hubspot_webform.module \hubspot_webform_help()

Implements hook_help().

File

hubspot_webform/hubspot_webform.module, line 181
Sends Webform results to HubSpot's Forms API.

Code

function hubspot_webform_help($path, $arg) {
  $output = '';
  switch ($path) {
    case 'admin/help#hubspot':
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The HubSpot module provides leads integration with the HubSpot API, allowing forms created
        with the Webform module to submit their data to HubSpot for leads tracking. It also allows you to easily embed
        the HubSpot JavaScript tracking code in your site to track the visits of each lead. Further information is
        available in the Drupal <a href="http://drupal.org/node/1195370">handbook pages for this module.</a>') . '</p>';
      $output .= '<h3>' . t('Creating a HubSpot Webform') . '</h3>';
      $output .= '<p>' . t("To have a Webform's data sent to HubSpot for leads tracking, complete the following steps:") . '</p>';
      $output .= '<ol>';
      $output .= '<li>' . t('Connect to your HubSpot account from the HubSpot settings page (links below).') . '</li>';
      $output .= '<li>' . t('From the Webform tab of any webform you will now see the HubSpot "subtab" link below. Click
       on that link.') . '</li>';
      $output .= '<li>' . t('On that page you will see a dropdown listing all of your HubSpot forms (set up from
        HubSpot.com). Select the form you want to map to this Webform.') . '</li>';
      $output .= '<li>' . t('Finally, just go through each Webform fields and map them to the HubSpot form fields
        available in each dropdown. Click save and you\'re done!') . '</li>';
      $output .= '</ol>';
      $output .= '<p>' . t('The Webform will now automatically send any submissions directly to HubSpot form you
        configured.') . '</p>';
      $output .= '<h3>' . t('HubSpot Javascript tracking code') . '</h3>';
      $output .= '<p>' . t('HubSpot supports using a JavaScript tracking system to analyze potential leads on your site.
        You can get the JavaScript code from your HubSpot settings, under External Site Traffic Logging, and paste it
        into the HubSpot integration settings page in Drupal to have it automatically included on every page.') . '</p>';
      break;
    case 'node/%/webform/hubspot':
      $output .= '<p>' . t("To post this form's results to HubSpot you will need to select the HubSpot form and map the\n        webform fields to the available HubSpot fields.") . '</p>';
      break;
  }
  return $output;
}