


Hello,
I am have a drop box with 5 options. when the user chooses an option a hidden form will appear. If the user fills in the information and then decides to choose a different option from the drop down menu instead the form they were filling out is hidden and the new form appears. The problem is if you go back to the form they were originally filling out, the information is still there. I would like the info to clear when other options are chosen.
I curently have the following script in the click event and exit events of the drop down:
if
(NumOfDep.rawValue == "1")
{one.presence
= "visible";
one.surname.mandatory
= "error";
one.firstname.mandatory
= "error";
else
if
(NumOfDep.rawValue == "0")
{one.presence
= "hidden";
one.surname.mandatory
= "disabled";
one.surname.rawValue
="";
one.firstname.mandatory }
Can anyone offer any suggestions?
Views
Replies
Total Likes
You can try like below..
switch(NumOfDep.rawValue)
{
case "1":
one.presence= "visible";
one.surname.mandatory= "error";
one.firstname.mandatory= "error";
one.surname.rawValue="";
one.firstname.rawValue="";
break;
case "0":
one.presence= "hidden";
one.surname.mandatory= "disabled";
one.surname.rawValue="";
one.firstname.mandatory = "disabled";
one.firstname.rawValue="";
break;
}
Thanks
Srini
Views
Replies
Sign in to like this content
Total Likes
Hi Srini,
Thank you for your help. i've tried that and it is not working. Do I actually use the word 'case'? and do i still put them in the click and exit events?
Views
Replies
Total Likes
Views
Replies
Sign in to like this content
Total Likes
I sent the updated form to your email..
Thanks
Srini
Views
Replies
Sign in to like this content
Total Likes