Utilities
Form Submit Script
ℹ️

Note Aisle Form Submit is a legacy feature and is not recommended for new customers as it is no longer supported. We suggest using the Landing Page Builder, Embed Forms or building your own form for optimal performance and support.

More information can be found at How to Capture Signups Using Aisle →

ℹ️

IMPORTANT Your form must have showOptInCheckbox set to true to be compliant with carrier guidelines. showOptInCheckbox will show a checkbox if enabled that the user has to agree to the Terms and Conditions and give consent for messaging.

More information can be found below Using the configuration options →

Form Submit Script

This is a javascript widget that allows users to inject Aisle's form onto any dom element.

Installation

  1. Place the below HTML snippet on your webpage.
<!--Configure the scripts properties-->
<script>
  var aisleFormConfig = {
    brandReference: "<brandApiKey>",
    campaignPhoneNumber: "<campaignPhoneNumber>",
  };
</script>
<!--Inject the main script-->
<script
  type="module"
  src="https://storage.googleapis.com/gotoaisle-assets-store/aisle-form-submit-script/index.js"
  onload="window.aisleFormLoad(aisleFormConfig)"
></script>
  1. Place an empty div on your webpage, this div will allow our form script to attach to the DOM element.
<!--This must exist in the dom when the script loads-->
<div id="aisle-form-submit"></div>
  1. Place the CSS stylesheet on your page to load the default form's stylesheet.
<link
  rel="stylesheet"
  href="https://storage.googleapis.com/gotoaisle-assets-store/aisle-form-submit-script/index.css"
/>
ℹ️

Note The stylesheet is optional, do not load it if you plan to apply your own css to the form as you'll be conflicting with the default configuration.

Configuration Options

The table below shows all possible configuration options for the form:

OptionDefaultDescription
targetDomElement'aisle-form-submit'Select which DOM element you want to attach, referenced by ID attribute
campaignPhoneNumberRequired - The phone number associated with the campaign.
brandReferenceRequired - A reference identifier for your brand. This is provided by Aisle's support team
headingTextundefinedText for the form heading. Ex: "Buy One, Get One"
subheadingTextundefinedText for the form subheading. Ex: "Purchase our product from Target"
isInputHiddenAfterSubmitfalseHides Input Fields after user successfully submited the form
prettyInputfalsePhone number input has pretty printing while user types the number. Ex: Will show 1234567890 as 123 - 456 - 7890
successMessage'Thank you...'Used to display the success message.
showOptInCheckboxfalseRequired* - Must be set to true on all your forms to be compliant with carrier guidelines. Will show a checkbox if enabled that the user has to agree to the Terms and Conditions and give consent for messaging.
showEmailFieldfalseIf enabled, the form will display the email input field to capture signups.
debugfalseEnable debug mode for additional logging.

Using the configuration options

Pick your desired settings from above that you would like to overwrite and replace your code from step 1 above with the desired options The form below would render a form with a phone number field, email field and a checkbox for consent

<!--Configure the scripts properties-->
<script>
  var aisleFormConfig = {
    brandReference: "<brandApiKey>",
    campaignPhoneNumber: "<campaignPhoneNumber>",
    showOptInCheckbox: true,
    showEmailField: true
  };
</script>
<!--Inject the main script-->
<script
  type="module"
  src="https://storage.googleapis.com/gotoaisle-assets-store/aisle-form-submit-script/index.js"
  onload="window.aisleFormLoad(aisleFormConfig)"
></script>