Lead Capture Tools

ASCK
Mitglied

Wordpress Shortcode Forms while capturing page data

lösung

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 Upvotes
1 Akzeptierte Lösung
Ben_M
Lösung
Autorität

Wordpress Shortcode Forms while capturing page data

lösung

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. 

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
3 Antworten
Ben_M
Autorität

Wordpress Shortcode Forms while capturing page data

lösung

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 Upvotes
ASCK
Mitglied

Wordpress Shortcode Forms while capturing page data

lösung

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 Upvotes
Ben_M
Lösung
Autorität

Wordpress Shortcode Forms while capturing page data

lösung

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 Upvotes