Command Variable Instant Text Form...

The InstantTextForm command enables you to display customized forms like the following one:

Instant Text Form example

Upon hitting OK, the input values are stored in specified variables that can be referenced in subsequent expansion text or commands making it easy to produce canned text.

When selecting the Instant Text Form... menu item, you are invited to design your own customized form:

Instant Text Form Command Input

You first choose a form title: in our example we have chosen the title "My little form!".

Then for each input element:

Input Element

you define the following attributes:

Input Type

The input type specifies the type of input. You can choose between:

  • text which allows any text input.
  • lowercase text which forces the input to be lowercase.
  • uppercase text which forces the input to be uppercase.
  • number which only allows the input of digits.

Input Label

The label is visually associated with the corresponding input element. It is the text displayed to the left of the input editor:

Input Name

The name specifies the name of the variable in which the input will be stored.

The specified variable can then be referenced in subsequent expansion text or commands with its name using the following syntax:

$(name)

Input Value

It defines the initial (default) value of the input. It is optional.

Example

The following expansion displays our example Instant Text Form and produces some canned text with the input that you submit:

{InstantTextForm}
<form title="My little form!" variableGlossary="">
<input type="text" label="First name:" name="first-name"/>
<input type="text" label="Last name:" name="last-name"/>
<input type="number" label="Age:" name="age"/>
<input type="uppercase text" label="Country" name="country" value="USA"/>
{/InstantTextForm}
His name is $(first-name) $(last-name).
He is $(age) years old.
His country of birth is $(country).