Lead Capture Tools

ASCK
メンバー

Wordpress Shortcode Forms while capturing page data

解決

We are using WooCommerce and we have product pages IE: Elevator, or Chairlift so on. If a user lands on the Elevator product we want to give them the opportunity to talk to sales rep, We have integrated a hubspot form on the product page using a wordpress hubspot shortcode.

Here is are issue unless we explicity ask them in the form, and we don't want to ask them the price the product so on to save them time, how does the sales rep know what product they were looking at?

Is there anyway to capture the information from the page and have it sent with the form submission, at the very least the URL so the sales rep could click on the url and see what product they were looking at.

Kindly,

0 いいね!
1件の承認済みベストアンサー
Ben_M
解決策
キーアドバイザー

Wordpress Shortcode Forms while capturing page data

解決

You will probably do this in a more programmatic way then to simply set the numbers manually per page. So for instance in the onFormReady or onFormSubmit functions you could run something like:

 

    onFormReady: function($form){
    	$('input[name="productname"]').val('Elevator').change();   
   	}

 

The function you choose will depend on whether the information is known to the system when the form generates or whether it will be passed to the form via the page after the user makes choices. 

元の投稿で解決策を見る

0 いいね!
3件の返信
Ben_M
キーアドバイザー

Wordpress Shortcode Forms while capturing page data

解決

Sure. You can pass values to hidden form fields. I don't know whether it can be done via the shortcode, but it can definitely be done by customizing the standard form embed code ( https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options ).

0 いいね!
ASCK
メンバー

Wordpress Shortcode Forms while capturing page data

解決

Looking at this makes sense to me. However if this is my hubspot form

 

```

hbspt.forms.create({
region: "na1",
portalId: "redacted",
formId: "redacted"
});

```

 

How do I add hidden fields, and how do those hidden fields show up in hubspot. Do I just do something like this?

 

```

hbspt.forms.create({
region: "na1",
portalId: "redacted",
formId: "redacted",

productName: "Elevator",

productPrice: $120,000
});

```

Or is there a more specific way to do hidden fields themselves?

0 いいね!
Ben_M
解決策
キーアドバイザー

Wordpress Shortcode Forms while capturing page data

解決

You will probably do this in a more programmatic way then to simply set the numbers manually per page. So for instance in the onFormReady or onFormSubmit functions you could run something like:

 

    onFormReady: function($form){
    	$('input[name="productname"]').val('Elevator').change();   
   	}

 

The function you choose will depend on whether the information is known to the system when the form generates or whether it will be passed to the form via the page after the user makes choices. 

0 いいね!