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

"Internal use only" fields in forms

jgranath
Registered: May 8 2007
Posts: 10

I would like to add some fields to a form which are not visible to the end users (those that complete the form) but are visible to those processing the received forms at the time they're prompted to add them to the dataset. I experimented a little with the "visibility" options but I couldn't come up with the right thing.

The field would be something simple such as a checkbox indicating that the forms data has been verified.

I noticed that received forms data is modifiable in the "dataset view". The process I'm thinking is that the receivers could modify information in the completed forms as needed and then flip the checkbox before exporting data to a .csv file that can be imported into our larger system.

Any comments or direction on these ideas is greatly appreciated.

- Jerry

Terrill
Registered: May 4 2007
Posts: 14
Jerry,

The way I handled it was this...

My form has a section labeled "Office Use Only". But, with a minor twist: it's actually two text fields. The first text field (txtOUse0) is Read Only, and has the value:

"Office Only"

I created a 2nd Text Field (txtOUse1) that is not read only, and has the value "Use". The user has to know to click on the word "Use" in order to activate the javascript.

My Office Use Only form has two radio buttons (Hired Yep, and Nope), job title, and a comment field.

In the Mouse Up() event of txtOUse1, add the following:

var sPswd = "";var bVis = display.visible;var bHid = display.hidden; if (this.getField("radHire.0").display == bHid){sPswd = app.response("Please enter password");} if (sPswd == "password"){this.getField("radHire.0").display = bVis;this.getField("radHire.1").display = bVis;this.getField("txtHireTtl").display = bVis;this.getField("txtHireCmt").display = bVis; this.getField("radHire.0").setFocus();}else{this.getField("radHire.0").display = bHid;this.getField("radHire.1").display = bHid;this.getField("txtHireTtl").display = bHid;this.getField("txtHireCmt").display = bHid;}

If they click on the "Use" field, they get a request for entering the password. If they know it, I unhide the fields. After you've made the fields visible by entering the password, you can click on the txtOUse1 field again and NOT enter the password to hide the fields!

In the On Focus() event of txtOUse1, I send them to a different field. This prevents them from tabbing to the field during normal use. Mine looks like this:

if (this.getField("txtOUse1").LastField == "txtReferred"){if (this.getField("radHire.0").display == display.visible){this.getField("radHire.0").setFocus();}else{this.getField("txtCoNm1").setFocus();}}else{this.getField("txtReferred").setFocus();}

As you can see above, I obviously have code behind several fields before and after the Office Use Only fields that set the txtOUse1.LastField property so I know which direction they were tabbing. No, .LastField is NOT a normal property! You can add any property you'd like to objects, so this is a "made-up" property. So, for example, in the field txtReferred On Focus() event I have:

this.getField("txtOUse1").LastField = "txtReferred";

It's really quite simple, actually. And yes, if the user is tabbing and paying attention, they may see the txtOUse1 field gain focus for a nanosecond, but it works well enough for me! You could make the field smaller by using a single space field, or the letter "s" in "Use." It wouldn't be as noticeable when they tab through...

Enjoy!