• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Field b required if field a is empty

Field b required if field a is empty 10 years 5 months ago #29630

  • uniqWeb
  • uniqWeb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Hello

I have a field email and a field telephone number. One of them should have data. How can I add the validation to the rsform ajax script?

Validation: If email is empty and phone not -> no error. If phone is empty and email not -> no error. If both have data -> no error. If both are empty -> error.

At this time, both field are set to required and both should be visible in the form. Do I have to set them to not required and add class 'rsform-error' if both are emtpy?

How do I implement that? I'm not fit in ajax.

Regards Simon
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!