N
N
NikiWeb2018-09-14 15:04:33
WordPress
NikiWeb, 2018-09-14 15:04:33

How to pull product name in Contact Form 7 from Woocommerce product category?

When you click "Order", a popup press form opens to which CF7 is attached, I need to pull up the name of the product above which this button is located.
5b9ba3c1c07c4195777613.png
How can this be implemented? Help me please.
Link to the site: http://tort-el.ru/product-category/popular/for-a-day...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NikiWeb, 2018-09-14
@NikiWeb

The issue is resolved
I assigned an attribute with the title name of the product to the button and displayed it through the function

$('.zakaz').click(function()
{
titleService=$(this).attr('data-title-service');
$('.hide-title').val(titleService);
});

Further, in the contact form settings, I displayed the shortcode
[hidden title-service class:hide-title id:title-service]
And everything worked out

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question