Home › Forums › Quform PHP › Validate a form element depending on another form element
Hi,
I want to validate a form element depending on another form element: if form element “kundennummer” is empty the user must fill the name field.
With the following code in process.php it is not working:
if ($form->getElement(‘kundennummer’)->isEmpty()) { $name->addValidator(‘required’); }
Any idea?
Thanks and regards,
Henning
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
Hi Ally,
thanks for the quick reply – and the solution!
Regards,