Forums

Required one of two fields

ike 06 Oct, 2017
Hello,
I can't find the solution. I want to use two text fields (email and phone) and I want to make required at least one of them. It is not important which one but at least one.
How to do it?
stanley918 21 Mar, 2019
I so need this solution too!
Max_admin 23 Mar, 2019
Hi,

The "text field" has an events section, add an event to disable the phone field validation when the email is not empty, and enable the phone validation when the email is empty!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 24 Mar, 2019
Put a Switch Event action with data source set to
{data.empty:email}|{data.empty:phone}
This will be true only if BOTH are empty. At which point you can show an error message.
This will work for your situation as you've described it - AT LEAST one, which I assume means you can do one OR BOTH.
This topic is locked and no more replies can be posted.