Answer the question
In order to leave comments, you need to log in
Pass product name from Woocommerce Contact Form 7 category page?
There is a product category page - https://mobilecharger.info/product-category/chargers/
Under each card, a form made on Contact Form 7
How to transfer the product title in this form?
The product button has the following data:
<a class="product-enquiry-click click-link-btn" href="#" data-product="Портативная зарядка для кафе Easy" data-toggle="modal" data-target=".modal-price-quote">Узнать наличие и цену</a>
[dynamichidden dynamichidden-737 "CF7_get_post_var key='title'"]
Answer the question
In order to leave comments, you need to log in
As far as I remember, if user.find()
a promise returns, then it must be returned. That is, it should be something like this:
function findAll() {
return user.find()
.then(function(doc) {
return user.find(); //(1)
// Да это глупо,но тут просто для примера так сделано
});
}
$('.click-link-btn').on('click', function(){
var $this = $(this),
product = $this.closest('.product'),
product_title = product.find('.product-title').text();
$('.modal-body #hidden_title').val('product_title');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question