FORM


The FORM tag defines an interactive form and is used in the agent web interface in its standard format with additional BMC Software specific functionality. For more information about the FORM tag in general. refer to a standard HTML 4.0 reference.

Forms are generally created for data input. When the user submits the form through an input or button element the form values are submitted to the URL given in the form's required action attribute.

The FORM tag was extended by BMC Software through the htmlfile parameter to allow the agent interface to execute specific actions. It is not necessary to specifically include the action and method parameters, because they are directly included into the parser: action always is 'mwcparse' and method is 'post'.

Start Tag

required

End Tag

required

Syntax

<FORM htmlfile='filename.html'></FORM>

Mandatory Parameters

htmlfile

The htmlfile parameter defines the file to be loaded next. This file contains the necessary Chilli scripts to process the entered data.

Optional Additional Parameters

There are no optional parameters for this function.

To enter and process data via the FORM tag in the agent interface two files are necessary:

  1. An HTML file containing the FORM with its boxes to be filled in and the htmlfile parameter.
  2. A file containing Chilli scripts to process the data entered into the FORM of the HTML file called through the htmlfile parameter in the first form sheet HTML file.

htmlfile

The BMC Software extended FORM tag expects the htmlfile parameter to define the file which will compile and execute the data entered into the form sheet. The file path can either be relative to the current directory or absolute.

Example

myfile.html:

....
<FORM htmlfile=DataProcess.html>
Enter Data:
<INPUT name=Data type=text>
......
<INPUT name=submit type=submit>
</FORM>

When the form is submitted, it calls the file DataProcess.html, which processes all entered data through Chilli scripts.

DataProcess.hchl

<SCRIPT>
extern string Data
</SCRIPT>
<SCRIPT>
if (defined (`Data'))
print ("Your data is " + Data.s)
else print ("No data specified")
endif
</SCRIPT>

Line 1-3:

Before any of the entered data can be processed in this file, all data variables need to be declared through the external keyword in a structured script. If the variables are not specifically declared at the beginning of the file, the following script
will not compile because it cannot find the variables.

In this example, the "Data" variable has the suffix ".s" to indicate that the variable is a string variable. The variables may optionally be specified in the form of var.suffix, if the value of the variable might be ambiguous. The parser will automatically add the respective suffix if it is not mentioned.

Possible suffixes are:

i = integer
c = character
f = float
d = double
b = boolean
s = string

Line 4-9

After the variables are declared, a script is needed to compile all entered data. In the preceding example, this script could consist of only lines 4, 6 and 9. However, if the "Data" field is left empty, this might cause the script to not compile or compile with an error. Therefore, it is recommended to always add an if/endif (lines 5-8) statement to avoid any compiling problems.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*