to the tippy ↑

Website contact form integration

Our website contact form integration allows you to embed forms within your own website that will let your customers enter their details directly into Capsule. We have kept our form really simple so you can apply whatever style suits your businesses identity.

To set up this integration you need a few account specific details that you can only find inside your Capsule account. To get them, go to the Account Settings Integrations Website Contact Form.

Setting it up

Step 1 - Generate the form key

You do that using the button on the integration setup page

Step 2 - Create a form

Add the form into your website with the following easy steps:

  1. Copy the following code and paste it into your website
  2. Change the COMPLETE_URL to the page you wish to display after the form is submitted
  3. Apply styling to match the rest of your website
<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>

Step 3 - Customize your form

In addition to name and email address all sorts of details can be captured for your leads. To find out what additional fields to use, go to the Account Settings Integrations Website Contact Form.

Assigning the follow-up tasks to another user

By default Capsule will create follow-up tasks for the Super Administrator on your account. This can be changed to a different user by setting the field REVIEW_ID to the ID of one of your users.

You can find the IDs for your own Capsule users in the panel on the right hand side in the Capsule Account Settings Integrations Website Contact Form Integration.

Tip

If you are using Capsule on the Teams plan, setting the REVIEW_ID field to a user with a default team will mean new form submissions are added to Capsule and assigned to the users default team. This may mean that new form submissions will not be visible to all users.

Avoiding spam

If you find that you’re 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 the key, go to the Account Settings Integrations Website Contact Form and use the button to reset it.

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.

For a more permanent solution there are two options. The first option is to extend the existing form on your website to add what we call a “honey trap” field. You need to add this alongside the other inputs in the form:

<style type = "text/css" scoped>#comment-field { display: none; }</style>
<input id="comment-field" type="text" name="COMMENT" />

Normal visitors of your site won’t see this field at all since it’s hidden by the styling rule, but a spam bot will see the COMMENT field and populate it. Any submissions received with the COMMENT field filled in are silently ignored by Capsule so that the spam bot thinks it has been successful.

Some spammers are more ingenious than others and so the approach above may not work for them. In this situation we recommend taking a look at our Wufoo integration. Wufoo are specialists in this area and have done some clever stuff around spam detection. They have an option to intelligently include a CAPTCHA if Wufoo thinks that the person about to submit the form is likely to be a spam bot. This is less annoying for your genuine contacts than having using a CAPTCHA technique that all visitors have to complete.

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:

Step 1 - Add a custom field

To add the custom field, visit Account Settings Custom Fields and click ‘Add New’ > Check Box field.

Label the field with ‘Consent to updates and marketing’, or a name that makes sense to your business. Take a note of this label as you’ll need it later.

Step 2 - Add the relevant code to your form

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">

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: