News:

Looking for documentation? Take a look on our wiki

Main Menu

2 different ask question forms on one product page

Started by hazael, October 10, 2019, 11:50:33 AM

Previous topic - Next topic

hazael

How to make two different form fields on the product page? I want a separate special form depending on the product name displayed.

for example, the default link
/index.php?option=com_virtuemart&view=productdetails&tmpl=component&task=askquestion
link to a separate form
/index.php?option=com_virtuemart&view=productdetails&tmpl=component&task=askquestion2

hazael

I solved it by doing 2 forms in one place depending on itemid

if (JRequest::getVar('Itemid') == '666'){
   FORM1
}else{
   FORM2
}