VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: pepsodent on February 28, 2017, 10:39:15 AM

Title: How to set mandatory a user field based on another user field value
Post by: pepsodent on February 28, 2017, 10:39:15 AM
Hi all,

I hope someone could help me.

I need to make a field mandatory, when a customer go to checkout page to confirm the order, based on another field value. An alert should be fine too.

Example:

Field1 is an input text field
Field2 is a select field (value1=a / value2=b)

if Field1 is empty and Field2 value=a --> Alert("Compile Field1")
if Field1 is empty and Field2 value=b --> OK


I use Virtuemart 3.0.18 and VmOnePageCheckout for checkout.

Thanks to those who will help me and sorry for my bad english and my bad explanation.