• 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: Javascript function rsActionOnValidate

Javascript function rsActionOnValidate 6 years 5 months ago #37447

  • Paladin
  • Paladin's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hello !

While RSForm Pro still has no a conditional field feature based on another field true/false validation.
I mentioned that in my previous post
www.rsjoomla.com/forum/37-rsform-pro/288...lse-validation-.html

But I'm still looking for a solution for a task below. Hopefully this post is more concrete for somebody to answer.

I have a textbox field ‘info’ to validate and two checkboxes with ids ‘exists0’ and ‘exists1’
Please, help with a javascript function what can mark checkbox ‘exists0’ if validation of textbox field 'info' is FALSE – or mark checkbox ‘exists1’ if validation of textbox field 'info' is TRUE.

An idea of code something like that (please, don’t laugh, I’m not a programmer, I know my syntax below is ugly and wrong)
But I hope a professional could correct the one.
<script type="text/javascript">
function rsActionOnValidate()
{
if(document.getElementById('info').validation=false)
set (document.getElementById('exists0').checked)
 
if(document.getElementById('info').validation=true)
set (document.getElementById('exists1').checked)
 
}
</script>
Thanks in advance for any hint !
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!