[an error occurred while processing this directive] The WebCom Forms Processor Configuration File Parameters The forms processor configuration file contains formats, parameters and if/then/else statements. This page describes parameters.
The form processor pre-defined parameters can be used to easily manipulate the way in which the form processor handles your form. For example, if you want the contents of the form to be emailed to mbox@yourdom.com, you could simply set the value of the "email" pre-defined parameter to that address. When you set the value of the email parameter to an address, the form processor automatically mails the contents of that form to that email address.
There are two ways to set a value of a parameter:
For example, if the only thing you want to specify about the handling of your form is the email address to which it is sent (that is, you want it to go to some other address than userid@webcom.com where the file would be sent by default), you could simply create a hidden field in the form which sets the value:
<INPUT TYPE=hidden NAME=email VALUE=mbox@mydom.com>
Alternatively, you could create a configuration file in your form directory and set the email address in that file:
$email="mbox@mydom.com";
Either method results in the form's data being emailed to the address "mbox@mydom.com" each time somebody submits the form.
Parameter settings in the configuration file have the general form:
Here are some examples:
$email_subject="$last_name, $first_name";
$email="mbox@mydom.com";
$order_subtotal=$item1_amt + $item2_amt + $item3_amt + $item4_amt;
$comments = s/\n//;
$first_initial=substr($first_name,0,1).",";
As the above example illustrates, in addition to to setting pre-defined form-processor parameters such as email and email_subject, you are free to define your own parameters (variables) and set them to any value you like.
For example, you could use this feature in conjunction with if/else/endif to create very intelligent forms applications. One example would be to define a parameter called 'reject'. You could test various values of the user's input on a form, and set reject="Y" if any of the tests failed. At the end of your configuration file, you could display a special error message to the screen if the value of reject were "Y".
Remember, if your form processor application is only using parameter settings, (and not if/else/endif statements or format statements, you don't have to use a configuration file, but can simply code the parameter settings in your form directly using hidden fields as follows:
<INPUT TYPE=hidden NAME=parm_name VALUE=parm_value>
Here are some are some of the things you can have the form processor do just by setting a pre-defined parameter to the appropriate value:
In a nutshell, use the file, screen, and email parameters to define outputs to a file, the users's screen, or an email address, resp. Use the e_delimiter, e_field_separator, e_names and the f_delimiter, f_field_separator, and f_names parameters to set the value delimiter, field separator character(s), and whether or not you want field names as well as values included in the email message or file, resp. [an error occurred while processing this directive]