These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need Help Re: Forms Creation Make Text Appear or Disappear?

jonnyapple
Registered: Jan 5 2010
Posts: 2

Hello,

I am assisting in the creation of a form that will be used by support personnel to send to clients.

I would like to know if it is possible to make a form where if the user clicks, let's say the check box, 3 or 4 pre-defined sentences are displayed. If the box is not checked, I do not want those sentences displayed.

I am using Acrobat Pro extended 9

Thanks

My Product Information:
Acrobat Pro Extended 9.0, Windows
revoxo
Registered: Jul 20 2009
Posts: 17
This assumes a text field called "Text1" and a standard check box.
In the actions tab of the check box using a mouse up event put the following code:

var txtFld = this.getField("Text1");
var cbStatus = (event.target.isBoxChecked(0)) ? "Sample Text" : "";
txtFld.value = cbStatus;

You can use "\n" in the text if you want a new line (provided the text field is set up as multiline).

Hope this helps.
cwparks
Registered: Apr 2 2009
Posts: 36
And if you want your sample text to display as regular text on the page, not within a form field, set the Text1 field to Read-only. This way the form field isn't visible.

I use read-only fields for header fields on subsequent pages that are autofilled from name and date fields filled in by the user on the first page of a form. They just look like part of the non-form text of the document.