How Can We Help?

How to get leads from a website form into Capsule

When you have a website it’s a great opportunity to gather leads through a form. To save you having to manually add those form submissions as contacts in Capsule you can instead connect the form directly to Capsule so that each submission is created as a new contact.

The Capsule website contact form integration uses simple HTML form elements where you can customize exactly what details from the form are added to which field on the contact in Capsule. Once a form is submitted and the contact is created you’ll receive an email notifying you about the new contact and a task will be added to Capsule for you to check the details for the new submission. That way you’ll always stay on top of your new leads.

The integration requires a webform key which is specific to your Capsule account. A Capsule Admin can find the key by going to the Account Settings > Integrations > Website Contact Form.

How to setup the website contact form integration

  1. The integration uses the standard HTML form elements with specific actions and field names to ensure that the form fields are mapped to the correct fields in Capsule. Use the following code as a framework:
<form action="https://service.capsulecrm.com/service/newlead" method="post">
<input type="hidden" name="FORM_ID" value="[Your form key]" />
<input type="hidden" name="COMPLETE_URL" value="http://yourwebsiteurl.com" />
First name:
<input type="text" name="FIRST_NAME" />
Last name:
<input type="text" name="LAST_NAME" />
Email:
<input type="text" name="EMAIL" />
<input type="submit" value="Submit" />
</form>
  1. Insert your webform key in the FORM_ID value and make sure to set the COMPLETE_URL to the URL that you want the customer to see when they have completed the form.
  2. If you need to include more fields into your form then below is a list of all the available options and how to format them. Please insert them in the form code above the submit input.

How to customize your integrated website contact form

In addition to the standard first & last name and email address fields you can use the form to collect anything from the title, company name, tags and custom fields. Below is a list of all available field options and some notes about how to use each one:

FORM FIELD REQUIRED Description
FIRST_NAME No* <input type="text" name="FIRST_NAME">
LAST_NAME No* <input type="text" name="LAST_NAME">
PERSON_NAME No* <input type="text" name="PERSON_NAME">
TITLE No <input type="text" name="TITLE">
JOB_TITLE No
ORGANISATION_NAME No* <input type="text" name="ORGANIZATION_NAME">
TAG No <input type="hidden" name="TAG">
NOTE No <input type="textarea" name="NOTE">
EMAIL No <input type="text" name="EMAIL">
PHONE No <input type="text" name="PHONE"> Optionally you can specify the phone number type in square brackets (e.g. PHONE[HOME], PHONE[WORK] etc.
STREET No <input type="text" name="STREET"> To create an address at least one of the STREET, STATE or COUNTRY fields must be populated. Optionally you can specify the address type in square brackets (e.g. STREET[HOME], STREET[POSTAL] etc.
CITY No Same as above
STATE No Same as above
ZIP No Same as above
COUNTRY No Same as above
WEBSITE No <input type="text" name="WEBSITE">
CUSTOMFIELD No e.g. <input type="text" name="CUSTOMFIELD[Source]">. To specify a DataTag where the DataTag name is Lead and the Custom Field within it is Source, use a dot between them like this: <input type="text" name="CUSTOMFIELD[Lead.Source]">

The following options can be set by incliding them as hidden fields in your form:

FORM FIELD REQUIRED Description
FORM_ID No* We use this to identify your account.
COMPLETE_URL No* A page on your website the user will see after submitting the form. If you plan to submit your form via a proxy then you can remove this field from the form. The form will return with the status HTTP 200.
REVIEW_ID No* Optionally use this field to set the user who will be assigned the task to review the contact. If this is not set the task will be assigned to the account super administrator. See the page in your integration settings for list of review id’s.
DEVELOPER No Set this field to TRUE while developing your form. A summary of the data supplied will be displayed and no data will be added to your Capsule account.
SEND No Set this field to FALSE to suppress the email sent when a new contact is added by the contact form.
DATE_FORMAT No* Use this to override the default format dates. Examples formats: dd-MM-yy, MM-dd-yy, yy-MM-dd, dd/MM/yy etc


How to add tags to a contact using the form

It can be helpful to tag the contacts that come through the form to better identify them and to get an idea of how many contacts are created through the form compared to those who are imported or added manually. As per the details above, to tag the contacts that come through via the form with webform for example you can include the following line of HTML code in your form:

<input type="hidden" name="TAG" value="webform">

The fact that the input type is set to hidden means that the person filling in the form won’t see it but their contact in Capsule will still be tagged accordingly.

Along with recording a lead’s name and contact details, you may wish to record their consent to update and marketing at the same time. To do this, you’ll need to add a custom field in Capsule where the consent can be recorded, then add some corresponding code to your form:

  1. To add the Custom Field, go to the Account Settings Custom Fields click Add New Check Box Field
  2. Label the field with Consent to updates and marketing or a name that makes sense to your business. Make a note of this label as you’ll need it later.
  3. Next you need to add the relevant code to your form. To do that, in your form code add this line of code between your <form> </form> tags:
<input
  type="checkbox"
  name="CUSTOMFIELD[Consent to updates and marketing]"
  value="TRUE"
/>
  1. Preface it with the question you’ll be asking your contacts, such as ‘Consent to updates and marketing’. If you’ve opted for a different label for your field, be sure to replace the name between the square brackets with your field name.

When you save your code, your form should look something like this:

And when your contact is added to Capsule you’ll see that check box on their record:

How to customize which user reviews the new submissions:

As mentioned above, when the form is submitted and the contact is created in Capsule, an email is also sent to a Capsule user and a task is added to the new contact in Capsule for the user to review the details. By default the email and task goes to the Capsule Super Administrator however you can change that using a dedicated option in the form. To do that, insert the following code:

<input type="hidden" name="REVIEW_ID" value="ID for the user">

Replace ‘ID for the user’ with the ID for the person to handle the new submissions. You’ll find a list of each user’s ID by going to the Capsule Account Settings > Integrations > Website Contact Form > in the panel on the right hand side. How to stop the form sending emails to the assigned user If you find that you don’t need to receive an email for every single form submission and instead just stay on top of them inside Capsule then you can insert a line of HTML to stop emails from being sent.. Use the following code:

<input type="hidden" name="SEND" value="FALSE">

How to test your form

If you want to try out the form without creating a bunch of contacts in your Capsule account then you can temporarily set it to a “developer mode” with the following line of code:

<input type="hidden" name="DEVELOPER" value="TRUE">

When you’re ready to put the form live you can either set the value to FALSE or remove the line from the form code completely.

How to avoid spam submissions

The Capsule website contact form integration can display a CAPTCHA to help you avoid getting spam submissions through to your account. From the integration setting you can configure when the CAPTCHA should be displayed - never, only for suspicious activity or always.

If you find that you’re still getting spam submissions through to Capsule via your contact form then as a first step we recommend that you reset your form key. That way any spam bot that has recorded details of your form won’t be able to make further submissions using the form details they have.

To reset and generate a new key, go to the Account Settings Integrations Website Contact Form and use the button to Generate new Key.

Once you’ve done that you’ll also need to update the key in the your HTML page to match so that new submissions on the form continue to work.

I don’t know how to write HTML - what do I do?

If you’re not comfortable writing HTML code for your website then there are a number of alternatives. Capsule integrates with an online form service called Wufoo which lets you easily build forms with simple drag and drop options and then you can use our integration to easily get those submissions through to your Capsule account. Read more about our Wufoo integration here

If you’re using Wordpress then there’s another 3rd party form service called NinjaForms who have their own Capsule plug-in which lets you create contacts as well as cases and sales opportunities from a form submission. You can check out NinjaForms on: https://ninjaforms.com/extensions/capsule-crm/

Alternatively, if you’re using another form service like Google Forms or Formstack etc then have a look at Zapier to see if they support it. In case you’re not familiar, Zapier is what we call an integration platform which integrates different services that don’t normally have their own integrations with each other and they support Capsule. We have more details on this in our article about the Capsule Zap for Zapier.

Didn’t find what you were looking for?
Contact us