Hi, I'm using a bit of simple javascript to create panels in my form that open and close a set of fields. Can someone tell me how to get the closed panel to open up if there is an empty required field? Right now, the validation message shows up at the top left of the page because the panel is closed.
Here is a bit of that code used:
Any help is appreciated. Thank you.
Here is a bit of that code used:
<a href="javascript:void(0)" onClick="$j('#optionlist').slideToggle('fast');">
<div id="optionlist" style="display:none;">
Any help is appreciated. Thank you.
Hi kko,
When the ChronoForms validator finds an error it add the class 'gvalidate_has_errors' to the input. If you check for this class inside each panel that should do what you need.
Bob
When the ChronoForms validator finds an error it add the class 'gvalidate_has_errors' to the input. If you check for this class inside each panel that should do what you need.
Bob
Hi Bob,
Thanks for the response. Can you post some code samples for me? I'm afraid my coding skills aren't quite there yet.
Thanks.
Thanks for the response. Can you post some code samples for me? I'm afraid my coding skills aren't quite there yet.
Thanks.
Hi kko,
I think that searching the innerHTML of the div will do what you need. Please see this StackOverFlow answer.
Bob
I think that searching the innerHTML of the div will do what you need. Please see this StackOverFlow answer.
Bob
This topic is locked and no more replies can be posted.