• 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: Hide required fields with custom Javascript

Hide required fields with custom Javascript 4 days 16 hours ago #43999

I have a large, not a multipage, RSForm form with a lot of show/hide interactions, being too much to manage within the Conditional Fields so I have Javascript within 'Form Properties > CSS and Javascript > Javascript' that show/hides what I need and that works correctly.

One thing I am unable to solve is the hidden fields that I am hiding with my own Javascript and not with the Conditional Fields interface are required to not be empty, and when I submit the form with those still being hidden RSForm validates even though hidden. I do have a couple other required fields separate from the ones that I hide myself where I do use the Conditional Fields and when they are hidden they correctly do not try to validate.

I've been expanding my Javascript trying to emulate RSForm's setRequired() and unsetRequired(), and any other idea I can find, such as manually removing and adding back aria-required, but am not having luck. I believe I'm making this harder than it should be.

Is there a way for me to show/hide required fields with my own Javascript and RSForm not attempt to validate a hidden required field? Or am I required to go a PHP route, such as referred to here:
www.rsjoomla.com/support/documentation/r...ted/php-scripts.html

Thank you for any help.
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!