Gridbox Store App Released

Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

2 text box form fields, either to be filled

6 days 21 minutes ago #1

  • Bumble's Avatar
  • Bumble
  • Posts: 22
Hi there, I wish to have 2 text boxes: Email and Phone.
Minimum requirement is only one of them is to be filled.
I do not need both filled.
If none are filled, a message appears: Please provide either Email or Phone.
How can I achieve this?
Need this urgently. Hope you can reply today.
Thank you for your help.

5 days 23 hours ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12205
Hello,

Thank you for contacting us!

There is no such option, but you can
try to implement it using conditional logic.

Create 2 required fields and 2 optional, and create a rule: if one of the required fields is not empty, then hide the second required and show optional.

Read more about conditional logic in our documentation
www.balbooa.com/joomla-forms-documentati...itional-logic-fields
www.balbooa.com/joomla-forms-documentati...joomla-forms-builder

Best Regards,
Vyacheslav, Balbooa Support Team

5 days 22 hours ago #3

  • Bumble's Avatar
  • Bumble
  • Posts: 22
Thank you for your help. I have tried it out but encountering some problems.

I have created 2 conditional logic rules:

1. Email filled up:
Condition *Email: Filled out
Actions
Hide: *Phone
Show: Phone
Hide: Email

2. Phone filled up:
Condition *Phone: Filled out
Actions
Hide: *Email
Show: Email
Hide: Phone

Upon form load, the 2 required fields are displayed.
But the "not required Phone" field appears too.

If I fill up either *Email or *Phone fields, the "not required Phone" field disappears.
What am i doing wrong?

Also upon form load, if the user does not fill up either required field, the standard error pops up on both fields that they are required. Is there a way to have a customised message?

4 days 19 hours ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12205
Hello,

We created an example form, you can download it and import
drive.google.com/file/d/1HP6HKfxiUoKHvjb...TsC/view?usp=sharing

Best Regards,
Vyacheslav, Balbooa Support Team
Powered by Kunena Forum