Autofill field from page / WooCommerce product name?

Hi Everyone - I’m not 100% how to word this, but we are looking to use a single enquiry form and embed it within WooCommerce products.

Question: Is there a field /or addon we can use for Gravity forms to capture the product name the form is on and add it to the submission… so we know which product the enquiry has come from?

Will save making an individual form for each product.

Or if anyone has achieved this another way - we would appreciate to hear your methods.

TIA.

Gareth, assuming that you have the form embedding part already resolved, to get the product title you can do this:

  1. Add a Hidden field to your form.
  2. Add the {embed_post:post_title} merge tag as Default Value (Advanced settings of the field).

WooCommerce products are just custom post types, so the above will add the product title to the Hidden field on form submission.

Hi Samuel,
Fantastic - thank you very much for your reply!
Appreciate it.

  • Just thought I would ask - I intended on using WooCommerce Gravity Forms Product Add-Ons to embed the form into the WooCommerce Product - is this the best way to go in your opinion or is there another (more cost effective) way of doing this. It’s just a simple enquiry form, so no pricing / cart options are needed.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.