Hi All,
I used this forum where I was given an answer to my question (Thanks Paul). My question now is:
I have a drop list with script behind it that makes a text field visible:
if (xfa.event.newText=="Vacancy")
form1.SBF00.position1.presence= "visible";
else form1.SBF00.position1.presence= "hidden";
The issue I have now is that more than one entry in the drop list required the text field to become visible. I did try this:
(First line on form)
if (xfa.event.newText=="Vacancy")or
(xfa.event.newText=="Sickness")or
(xfa.event.newText=="Annual Leave")
form1.SBF00.position1.presence= "visible";
else form1.SBF00.position1.presence= "hidden";
(Second line on form)
if (xfa.event.newText=="Vacancy")or
(xfa.event.newText=="Sickness")or
(xfa.event.newText=="Annual Leave")
form1.SBF00.position2.presence= "visible";
else form1.SBF00.position2.presence= "hidden";
I have the form set up with multiple lines that the end user can move down should they need more than one entry.It sort of works but if I select Sickness for example, the next box down (position2) doesn't show the text box visible if I choose, for instance, 'Vacancy'.
Thanks everyone.
Heavy E
Solved! Go to Solution.
Views
Replies
Total Likes
Try this:
if ((xfa.event.newText == "Annual Leave")||(xfa.event.newText == "Sickness")){
xfa.form.form1.BodyPage1.position1.presence = "visible";}
else {xfa.form.form1.BodyPage1.position1.presence = "hidden";}
Views
Replies
Total Likes
You will need to duplicate the code for each droplist item and for each droplist:
if (xfa.event.newText=="Vacancy")
form1.SBF00.position1.presence= "visible";
else form1.SBF00.position1.presence= "hidden";
if (xfa.event.newText=="Sickness")
form1.SBF00.position1.presence= "visible";
else form1.SBF00.position1.presence= "hidden";
if (xfa.event.newText=="Annual Leave")
form1.SBF00.position1.presence= "visible";
else form1.SBF00.position1.presence= "hidden";
Complete on droplist and then copy it.
second droplist would look like this:
if (xfa.event.newText=="Vacancy")
form1.SBF00.position2.presence= "visible";
else form1.SBF00.position2.presence= "hidden";
Thanks Paul
I did try this but must have missed something, I'll copy the code when I get to work, and thanks.
Kind regards
Ed
Views
Replies
Total Likes
I missed some brackets:
if (xfa.event.newText=="Vacancy")
{form1.SBF00.position2.presence= "visible";}
else {form1.SBF00.position2.presence= "hidden";}
Thank for the help, unfortunately I still cannot get the drop list to work properly so I am going to look for another way of doing it.
Views
Replies
Total Likes
Try this:
if ((xfa.event.newText == "Annual Leave")||(xfa.event.newText == "Sickness")){
xfa.form.form1.BodyPage1.position1.presence = "visible";}
else {xfa.form.form1.BodyPage1.position1.presence = "hidden";}
Views
Replies
Total Likes
Paulk07 is the man! Thanks for the support.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies