Passing Asset Name and Stream Name through HubSpot Embed Forms

Modified on Wed, 28 Jun, 2023 at 10:23 PM

Hushly enables you to use HubSpot Embed Forms on your Assets. HubSpot Embed Forms allow for the direct submission and storage of data in HubSpot. These forms contain the necessary fields for visitors to complete. As a result, Asset and Stream names are not included. To obtain the Asset Name and Stream Name from Embed Forms, create Hidden Fields and add them to the form.

Follow the steps below to create Hidden Fileds on the HubSpot form:

  1. Log into your Hubspot account, and navigate to Marketing > Forms.

  2. Manage an Existing Form or Create a New HubSpot Form.

  3. Add fields for Asset Name (asset) and Stream Name (stream) and Enable the toggle for the Make this field hidden option.

    Here's an example of how the Asset Name field is hidden on a HubSpot form.

  4. Once the required Hidden Fields are added to the form, click on Embed in the top right corner of the page.

  5. Copy the code from the Embed code tab.

  6. Include the following code within the Embed code. Replace the <> fields with the HubSpot form field code values.
    window.hushly_hushly_field_mappings = {
      hushly_asset_name: '<form-asset-field-code>',
      hushly_stream_name: '<form-stream-field-code>'
    };


  7. Here's what the final code looks like:
    <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
    <script>
    window.hushly_hushly_field_mappings = {
      hushly_asset_name: 'asset',
      hushly_stream_name: 'stream'
    };
      hbspt.forms.create({
        region: "na1",
        portalId: "23683872",
        formId: "4ab84666-6174-4d33-b5b9-4015e11b388b"
      });
    </script>


  8. Finally, add the Embed Form to Hushly. 


Related Topics:
Creating a Form in Hubspot and getting the Embed Code
How to Embed an External Form from HubSpot or Marketo

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article