Creating Lead Forms in Salesforce

In this topic you will learn how to create a Salesforce form that can be used to capture lead data during video playback.

Brightcove Campaign provides the ability to create lead forms which allow you to capture viewer information during video playback. Forms give you the ability to include whatever fields you need (visible or hidden) and also give you the ability to take advantage of features like progressive profiling (if available). The lead data is sent to, and processed by, Salesforce.

Creating a form in Salesforce

The Web-to-Lead feature in Salesforce can be used to generate lead information from website visitors. These forms can also be displayed inside of Brightcove Campaign video players. The steps below will create a simple form to capture first name, last name, email address, company, city and state/province. For complete details on the Web-to-Lead feature, see the Salesforce documentation.

  1. Sign in to your Salesforce account.
  2. Click Setup (gear icon).
  3. Enter Web-to-Lead in the Quick Find box and then click Web-to-Lead.
  4. Click Create Web-to-Lead Form.
  5. Select fields to include on your Web-to-Lead form. Use the Add and Remove arrows to move fields between the Available Fields list and the Selected Fields list, and use the Up and Down arrows to change the order of the fields on your form.
    salesforce web to lead setup
  6. Enter a Return URL. For this example, the Return URL will be set to http://www.brightcove.com. This value will be ignored when the form is used as a lead form inside Brightcove Campaign.
  7. Click Generate. The form HTML will be displayed.

Copying and editing the form HTML

To use the form inside of Brightcove Campaign, you will need to copy the form HTML. Also, you may want to do some basic styling to the form. In the steps below, we will copy the form HTML to an HTML editor and then make some styling changes to the form.

By default, when the form is displayed, the form will display on a transparent background over the player. Use CSS to set the background color.

  1. Copy the HTML to the clipboard.
    salesforce form html
  2. Click Finished.
  3. Paste the form HTML into your HTML editor of choice. You may want to use the code formatting feature of your editor to format the code so that it is easier to read.
  4. Using your HTML editor, add the following CSS to change the background color to grey.
    <style>
    body {
    background-color: rgba(204,204,204,0.9);
    margin: 0;
    padding: 20px;
    height: 100%;
    }
    </style>
  5. (Optional) To identify which leads are generated by Brightcove Campaign, the following code can be added inside the <form> tag:
    <input type="hidden" name="lead_source" value="Brightcove Campaign">
  6. Copy the HTML to the clipboard.

Validating the form data in Salesforce

Leads captured using the custom lead form will be added as leads in your Salesforce account.