• 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: Make Hidden Fields Mandatory

Make Hidden Fields Mandatory 14 years 2 weeks ago #10403

  • as0r
  • as0r's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I have several fields in my form that are hidden and only shown after the user made a selection from a radio button?checklist. I also managed to make one of thos field mandatory through this code:
<script type="text/javascript"> 
function validateAuction() 
{ 
if(document.getElementById('auction').style.display=="" && document.getElementById('Auction Date').value=="enter auction date") 
{ 
document.getElementById('component50').className = 'formError'; 
return false; 
} 
else 
{ 
document.getElementsById('component50').className = 'formNoError'; 
return true; 
} 
} 
</script>

The submit button checks this through
onclick="return ValidAuction";

Now the problem.
I was wondering how to include make more fields mandatory after they became visible?
Does anyone know the syntax?
Help would be greatly appreciated
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!