The most common way to capture input from a user is with the $Input command. This command generates HTML INPUT tags to capture input, and makes this input available to the various iService Actions that you specify for the form.
The basic syntax for the $Input command as as follows.
$input [-id'description']$
The $Input command creates an HTML input box, and the -id description is converted into the HTML ID tag. This ID tag is used to identify the input element, control styling, etc. Each command within an iService form MUST have a unique ID. With a few exceptions, all parameters used in the $Input are structured by beginning with a dash (-) and ending with a description enclosed within singled quotes (').
The syntax for parameters used with $Input is generally -PARAMETER'Description'. The description can be any text desired without spaces, and should be descriptive enough so that it's useful when referencing the command elsewhere within the form. The available parameters are as follows.
Example $Input command that captures values for a contact property using -group and -required
$input -contactProperty1'firstname' -id'firstname' –group'IT' –required$
•-contactProperty1'firstname' -- the first parameter in this example is a contact property. The – is used to indicate a new parameter, and the term contactProperty1 is used to indicate the input is a contact property. ‘firstname’ is an arbitrary name used to make the command more readable. The reference to 1 in this example is the ID of the property within iService. You can use the variable picker to generate the base $Input command, and it will automatically populate the propertyID number. •-id’firstname’ -- this second parameter is used to identify the input within the form actions section, and as a reference within the forms cascading stylesheet (CSS) for web designers. It is a unique identifier for the input command and can use any name that you’d like. It should be descriptive of the input (e.g., “firstname”). •-group – the “group” parameter is used on forms that have multiple submit actions. It allows you to designate the action to which the input is related. When you have a form that creates multiple interactions (e.g., two tickets) and do not use the group parameter, the properties will be added to all of the interactions. •-required – the “required” parameter is optional, and indicates that the user must complete this field before submitting the form. If the form is submitted without a value for this input item, an error message will be displayed. |