Implementing Forms

Implementing Forms

Where ever we use forms, we need to include all of the follow fields in order to use all the features of the forms.

<div class="sr-form">
	{% if module.form.title is truthy %}
		{% set no_title = False %}
	{% else %}
		{% set no_title = True %}
	{% endif %}
	{% if module.form.form.form_id %}
		{% form
			form_key="{{name}}",
			form_to_use="{{module.form.form.form_id}}"
			title="{{module.form.title}}"
			no_title="{{no_title}}"
			follow_up_type_simple="{{module.form.follow_up_type_simple}}"
			simple_email_for_live_id="{{module.form.simple_email_for_live_id}}"
			follow_up_type_automation="{{module.form.follow_up_type_automation}}"
			response_response_type="{{module.form.form.response_type}}"
			response_redirect_id="{{module.form.form.redirect_id}}"
			response_redirect_url="{{module.form.form.redirect_url}}"
			response_message="{{module.form.form.message}}"
			notifications_are_overridden="{{module.form.notifications_are_overridden}}"
			notifications_override_email_addresses="{{module.form.notifications_override_email_addresses}}"
			gotowebinar_webinar_key="{{module.form.form.gotowebinar_webinar_key}}"
		%}
	{% endif %}
</div>

For implementing Salesforce into a form use

HUBL
sfdc_campaign=‘{{ module.salesforcecampaign_field }}’

JSON
{
  "name" : "sfdc_campaign",
  "label" : "Salesforce campaign",
  "type" : "salesforcecampaign",
  "default" : null
}

JSON

{
  "id": "1",
  "name": "form",
  "children": [{
      "name": "title",
      "label": "Form Title",
      "type": "text",
      "default": null
    },
    {
      "name": "form",
      "label": "Form",
      "type": "form",
      "default": {
        "response_type": "redirect",
        "message": "Thanks for submitting the form."
      }
    },
    {
      "id": "notifications_are_overridden",
      "name": "notifications_are_overridden",
      "label": "Send form notifications to specified email addresses instead of the form defaults",
      "type": "boolean",
      "default": false
    },
    {
      "name": "notifications_override_email_addresses",
      "label": "Email Addresses",
      "visibility": {
        "controlling_field": "notifications_are_overridden",
        "controlling_value_regex": "true",
        "operator": "EQUAL"
      },
      "type": "email",
      "default": null
    },
    {
      "id": "follow_up_type_simple",
      "name": "follow_up_type_simple",
      "label": "Send a follow-up email",
      "type": "boolean",
      "default": false
    },
    {
      "name": "simple_email_for_live_id",
      "label": "Email",
      "visibility": {
        "controlling_field": "follow_up_type_simple",
        "controlling_value_regex": "true",
        "operator": "EQUAL"
      },
      "type": "followupemail",
      "default": null
    }
  ],
  "label": "Form",
  "type": "group",
  "default": {
    "form": {
      "response_type": "redirect",
      "message": "Thanks for submitting the form."
    },
    "notifications_are_overridden": false,
    "follow_up_type_automation": false,
    "follow_up_type_simple": false
  }
}

Last updated