Using Codes to Fill Out a Form

B

booge

I would like to set up a protected form for multiple users that would let
them tab through a document to fill out information. In one particular area
the ideal situation would be for an abbreviated code to be used as an entry
that would fill out a premade block of text obtained from a separate document
once the field was exited.Whether or not the entry field was changed to the
block of text or some hidden, non-printed field was used to fill out a
non-editable field doesn't matter. Is this possible, and how would it best be
accomplished?
 
J

Jean-Guy Marcil

booge said:
I would like to set up a protected form for multiple users that would let
them tab through a document to fill out information. In one particular area
the ideal situation would be for an abbreviated code to be used as an entry
that would fill out a premade block of text obtained from a separate document
once the field was exited.Whether or not the entry field was changed to the
block of text or some hidden, non-printed field was used to fill out a
non-editable field doesn't matter. Is this possible, and how would it best be
accomplished?

You could do this without code, given that you do not have too long a list
of abbreviated codes, otherwise it might be difficult to manage, not
impossible though!

Here is how you could do this without code. Create an AutoText entry for
each of the pieces of text you need (In my sample below, they are called
Text1, Text2 and Text3).
Create the form field dropdown with your choices. In my example they are:
"Select," "Text One," "Text Two" and "Text Three." Make sure you check the
"Calculate on Exit" box and that you give it a unique name in its property
dialog. In my example I called it "List_One."
Create a nested IF field where you want the said text o appear. Nested IF
fields are easy to amage once you understand how they work. A basic IF field
works like this:
{IF Condition "Result if true" "Result if false"}
In nested fields, you keep adding IF fields in the "Results if false"
section until you have exhausted all the possibilities:
{IF Test_Condition 1 "Result if 1 is True" "{IF Test_Condition 2 "Result
if 2 is true" "{IF Test_Condition 3 "Result if 3 is true" "Result if none of
the conditions are true"}"}"}.
In this case, it would look something like this:
{IF {REF List_One} = "Text One" "{AUTOTEXT Text1}" "{IF {REF List_One} =
"Text Two" "{AUTOTEXT Text2}"" "{IF {REF List_One} = "Text Three" "{AUTOTEXT
Text3}" "Nothing Selected"}"}"}

The limit of nested fields is 19. If you need more than that, just insert a
series of nested fields next to each other, replace "Nothing Selected" by ""
in all nested fields. Of course, you could have as many non-nested fields as
you have conditions, but in either cases, you cannot have the "Nothing
selected" option, unless you include it explicitly:
{IF {REF List_One}="Text One" "{AUTOTEXT Text1}" ""}{IF {REF
List_One}="Text Two" "{AUTOTEXT Text2}" ""}{IF {REF List_One}="Text Three"
"{AUTOTEXT Text3}" ""}{IF {REF List_One}="Select" "Nothing Selected" ""}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top