How do I show text when clicking checkbox...? and more
Copy link to clipboard
Copied
Hey. I'm quite illiterate when it comes to Adobe Acrobat, but now I have to create a form.
First obstacle, how can I use a checkbox (i.e. tick checkbox action) to show text? (actually both just text but also text and form). Is there a way to do this? is it dynamic enough to do this or shall I just give up. Objective is to have one form for different audiences, and some information should be visible to those who tick the checkbox, for those who don't should only see limited text and forms. Maybe there is a really good tutorial for this, or video?
I have figured out how to create forms and that was easy enough. I also found some javascripts that may work?:
var f = this.getField("chk2");if(f.isBoxChecked(0)){ this.getField("teamset2").display = display.visible; this.getField("member2").display = display.visible; }else { this.getField("teamset2").display = display.hidden; this.getField("member2").display = display.hidden;
}
BUT - i don't even know how to name the text. I.e. the "getField" - i guess that is only for fields, checkboxes etc. But can it be used for plain text too?
Much grateful for help. and sorry for asking probably very stupid question. But would really like to make this work.
Copy link to clipboard
Copied
A script can't show or hide static text directly. It can show/hide form fields, as you've found out, so you could create a (read-only) text field or you can use a (read-only) field to cover up the static text and then hide that field when you want to make the text visible, and vice versa.
Copy link to clipboard
Copied
Thanks. Kind of suspected it. That means thinks like borders and lines (to make things look a bit neater) cannot be hidden/shown either then I assume...?
Copy link to clipboard
Copied
Only by hiding them using other elements (namely, fields), as I've described before.
Copy link to clipboard
Copied
Hmm, I seem to have some problems with my document related to the topic. I cannot save it and I have absolutely no clue why. Anyone able to help me continue? don't want to make more changes to my doc if I cannot save it. many many many thanks!
Copy link to clipboard
Copied
It seems like the document is corrupt. How did you create it?
Copy link to clipboard
Copied
From An excel file. But I recreated and seems to be fine. We'll see
Den ons 29 maj 2019 10:44try67 <forums_noreply@adobe.com> skrev:
How do I show text when clicking checkbox...? and more created by try67
<https://forums.adobe.com/people/try67> in JavaScript - View the full
discussion <https://forums.adobe.com/message/11097499#11097499>

