In order for a Salesforce campaign to be associated with a HubSpot form, the campaign must first be marked as active in Salesforce. Follow the steps below to select an active Salesforce campaign to associate with a HubSpot form:
Please note: this feature is only applicable to Salesforce-integrated portals.
When using a form to set a Salesforce campaign, the campaign status will be set to Responded by default and will not be editable. If you'd like to be able to edit a contact's campaign status after originally setting it, you must use a workflow rather than a form to associate your contacts with your Salesforce campaign.
Additionally, it is not possible to remove a contact's association with a Salesforce campaign if the campaign was originally set using a form.
For a form on a HubSpot landing page:
- In your HubSpot Marketing Professional or Enterprise account, navigate to Content > Landing Pages.
- Hover over your landing page and click Edit.
- Within the page editor, locate the form module and click on the module to edit.
- Scroll within the Options tab of the form module editor to the Salesforce campaign section.
- Select your active Salesforce campaign from the dropdown menu.
- Click Done, then Update or Publish the page.
For a form on an external page:
- In your HubSpot Marketing Professional or Enterprise account, navigate to Contacts > Forms.
- Hover over the name of your form and select Actions > Embed code.
- In the dialog box, select your campaign from the dropdown menu and then click Close.
- If this form is already embedded on an external page, you will need to re-embed the form on your page, as the Salesforce campaign ID is added as part of the code, and this will not update dynamically.
Upon form submission, the SF Campaign ID will be included as a hidden form field.