This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
i have a button that when you click on it the hidden fields appear for the user to fill out (Thanks Steve for helping me out with that.) is there a way when you click on the button again the fields hide again? here is what i have in the java script for the button
form1.page1.Ambulance2::click - (JavaScript, client)
form1.page1.ambulance_2.presence
= "visible";
form1.page1.patient_2.presence
= "visible";
Thanks for the help
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
In the click event of the button you can first check the visibility of the fields first. If the fields are invisible then make it visible and if the fields are visible then make it hidden. For ex : You can try the following script.
form1.page1.Ambulance2::click - (JavaScript, client)
if(form1.page1.ambulance_2.presence == "hidden" && form1.page1.patient_2.presence == "hidden" )
{
form1.page1.ambulance_2.presence = "visible";
form1.page1.patient_2.presence = "visible";
}
else
{
form1.page1.ambulance_2.presence = "hidden";
form1.page1.patient_2.presence = "hidden";
}
In addition to it in the docReady event of ambulance_2 and patient_2 add this script : this.presence = "hidden";
Here is a link to a sample form. https://acrobat.com/#d=n4UdzlyPX-jBZOEyCVB5iw
Initially the fields are hidden. Once you click the button the fields will be visible if you again click it then fields will be hidden.
Thanks.
Bibhu.
Views
Replies
Total Likes
Hi,
In the click event of the button you can first check the visibility of the fields first. If the fields are invisible then make it visible and if the fields are visible then make it hidden. For ex : You can try the following script.
form1.page1.Ambulance2::click - (JavaScript, client)
if(form1.page1.ambulance_2.presence == "hidden" && form1.page1.patient_2.presence == "hidden" )
{
form1.page1.ambulance_2.presence = "visible";
form1.page1.patient_2.presence = "visible";
}
else
{
form1.page1.ambulance_2.presence = "hidden";
form1.page1.patient_2.presence = "hidden";
}
In addition to it in the docReady event of ambulance_2 and patient_2 add this script : this.presence = "hidden";
Here is a link to a sample form. https://acrobat.com/#d=n4UdzlyPX-jBZOEyCVB5iw
Initially the fields are hidden. Once you click the button the fields will be visible if you again click it then fields will be hidden.
Thanks.
Bibhu.
Views
Replies
Total Likes
Thank you very much
Views
Replies
Total Likes
Views
Likes
Replies