Lead Capture Tools

ASCK
Miembro

Wordpress Shortcode Forms while capturing page data

resolver

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 Me gusta
1 Soluciones aceptada
Ben_M
Solución
Asesor destacado

Wordpress Shortcode Forms while capturing page data

resolver

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. 

Ver la solución en mensaje original publicado

0 Me gusta
3 Respuestas 3
Ben_M
Asesor destacado

Wordpress Shortcode Forms while capturing page data

resolver

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 Me gusta
ASCK
Miembro

Wordpress Shortcode Forms while capturing page data

resolver

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 Me gusta
Ben_M
Solución
Asesor destacado

Wordpress Shortcode Forms while capturing page data

resolver

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 Me gusta