Answer the question
In order to leave comments, you need to log in
How to place multiple HTML forms on one page?
There is a joomla+virtuemart product category page. On this page, I added a form module to the product card, so there are 10 products per page, and 10 identical forms are obtained.
The question is how to do it so that 10 letters would not come to the post office, but only one at a time?
Answer the question
In order to leave comments, you need to log in
Mikhail Mirgorodsky , show a link to the site, there is an excellent domestic solution for joomla forms Radical form is very flexible and easy to use.
Regarding your site, why do you need 10 forms on the site, if it’s easier to make one form and a call button like this:
<button class="mt-2 mb-2 btn" type="button" ....
data-toggle="modal"
data-target="#modal"
data-modal-title="Заголовок в форме"
data-modal-textarea="Описание в форме">Купить в один клик</button>
$('[data-toggle="modal"]').on('click', function(){
let form = $($(this).data('target'));
if(typeof $(this).data('modal-title') !== 'undefined'){
form.find('.modal-title').html($(this).data('modal-title'));
}else{
form.find('.modal-title').html(form.find('.modal-title').data('default'));
}
...
});
<h5 class="modal-title" id="call-category" data-default="Заголовок по умолчанию">...</h5>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question