To begin creating your Form Capture, you first need to identify the webpage that the form should be on and write the form HTML on that page as well as add the tracking script to it.
Since you aren't using a ClickDimensions form, you will need to write the HTML to create your form. If you're not comfortable writing HTML (or CSS to further style your form), we recommend working with someone in your organization who is. ClickDimensions is unable to provide guidance on creating your form via HTML or adding styling with CSS.
Your form HTML will look something like the example below. (You can ignore the extra class attributes and <div> tags as those were included for styling purposes.)
And this is what your end users would see.
The action attribute should be set in your <form> tag as a placeholder. When you create the Form Capture record, ClickDimensions will automatically generate the URL you need for the action. So when you're setting this up, just leave it blank until you've gotten to the next step.
<form action="" method="post">
Don't forget that in the <form> tag, you need to have the method attribute set to post. Forms use either post or get and since you're wanting the submission to post to ClickDimensions, you'll need to use the post value to dictate that.
<form action="" method="post">
We'll discuss mapping the form fields in a later article, but when setting the form fields up in your form's HTML, be sure to leave a place for each form field's name attribute. When working on the mapping later, you'll need to enter a value there.
<input name="first_name" id="first_name" type="text" />
For the most part, setting the type attribute for each of your fields is simple--just use the type that matches what your end users should see on your form. However, there are a few caveats.
First, you need to have at least one field on your form with the type set to email. If this doesn't exist, your form won't be able to properly submit.
<input name="email" type="email" />
Second, you can have hidden fields on your form map back to fields in CRM. Just use the hidden value for the type attribute, but make sure to follow the mapping directions closely because mapping a hidden field is different than the other field.
<input name="source" id="source" type="hidden" value="campaign" />
Any fields that your end users must fill out should have the required attribute added. Since your form's HTML is driving what's submitted, the HTML must denote required fields directly in the form.
<input name="last_name" id="last_name" type="text" required>
The last bit of code you can add to your webpage is your ClickDimensions tracking script. (This can be the regular tracking script or the opt-out tracking script, depending on what your organization has chosen.)
Now the tracking script is only needed if you want to see the related tracking data—Page Views and Visits associated with the form submission. If your website is already including the tracking script in a global footer, then you're all set; otherwise, if you need the tracking data, add the tracking script to the page your form is on.
If you are adding the script, make sure that the domain and account key in it match a domain record and the account key in the CRM environment where your Form Capture record is set up. The domain should also match the domain of the website that your form's page is hosted on. If these items do not correlate, your end users will see errors when trying to submit the form and you won't see any form submissions come through.