InputBox
Description:
Format:
InputBox (string Title, string Message, string, Labels, string Fields, string Buttons)
|
Parameters: |
Stringr |
Title |
Title of the InputBox form |
|
String |
Message |
Message displayed in the InputBox form |
|
|
String |
Labels |
Comma delimited list of Labels and Attributes for Fields. |
|
|
String |
Fields |
Comma delimited list of Variable Names. The Variable Names can represent string, integer, decimal, or boolean variables. |
|
|
String |
Buttons |
Comma delimited list of Button Names. |
|
|
Return Value: |
String |
Button |
Name of Button that was clicked. |
Usage:
A sound is heard when an InputBox opens.
When an Input Box is opened the Autoweb Control Panel is hidden until the InputBox is closed.
Data entered into a field must be valid for the field type. (i.e. an Integer field must have only numbers in it)
Label lengths, excluding attributes, are limited to 40 characters.
Field length attributes determine the size of the field. Approximately 40 characters is the maximum displayed, but the field may be longer and will scroll horizontally. Field length attributes are ignored for Boolean variables
Field length attributes, if present, must be first in the attribute, single character attributes may be in any order.
Labels for Required Fields are displayed in Magenta with an asterisk added to the end of the label.
Required fields must have values before completing the form., unless the Cancel button is pressed.
When a Cancel button is pressed all values entered into the form are ignored and the variable values remain unchanged.
Password fields display a large dot for each character instead of the actual character typed.
Example 1:
Basic InputBox to retrieve the value for one variable. The value can be 40 characters long and is required. If the User presses 'Ok' a field is set and a button is clicked.
String strSearch
If InputBox('Search', 'Enter your search words', 'Words:#40R', 'strSearch', 'Ok') = 'OK'
SetFieldWithLabel ('Search', strSearch)
ClickButtonWithText ('Submit')
EndIf
Example 2:
// Declare variables
string strTitle
string strMessage
string strLabels
string strFields
string strButtons
string strResult
string strUser
string strPass
boolean boolSave
// Set Values
strTitle = 'Logon to Application'
strMessage = 'Enter your User ID and Password to logon.'
strLabels = 'UserID:#20R, Password:#PR, Remember ?:'
strFields = 'strUser, strPass, boolSave'
strButtons = 'Submit'
strUser = 'JohnSmith' // Default User ID
strResult = InputBox (strTitle, strMessage, strLabels, strFields, strButtons)
If strResult = 'SUBMIT'
// Do something
. . .
EndIf