A form is used to obtain input and send it to a specific location. For example, a 'contact us' form that accepts a name, email address and comment/question from a visitor.
To insert a form, click on the Insert menu and select the Insert Form icon. This adds Form tags, in which the form elements must be added to. eg. text boxes, buttons, etc. To add form elements, select the element to add in the Form menu.
Form elementsFieldset - Adds a border around the form elements inside the fieldset.
Submit - A button that submits the form. More information below.
Reset - A button that clears all data that has been entered into the form.
Radio button - a selection element whereby only one option can be selected.
Check box- a selection element whereby multiple options can be selected.
Text Field- a single line input field for text.
Text Area - a multiple line input field for text.
Password field - a single line input field that displays the * character when typed into.
Drop down selection - a selection element that allows a single selection from a list.
List box selection - similar to a drop down selection, but allows for multiple selections.
File upload field - an input field with a browse button for selecting files.
An example of a contact form and the various form elements:
To change element properties double click the element. The properties window will show options available for the element.
Submitting form dataTo send the submitted form data to a destination, you need to specify a form 'action' and 'method'. The action tells the form where/how to send the data. There are two ways for the data to be sent from a form.
The form data can be sent to a CGI, Perl, asp or other type of script where the script will capture the data and send it to a specific email address, or the mailto method can be used.
The mailto method uses the visitor's email client (program) to send the form data. To use this method, in the action field, enter the destination email address. When the submit button is clicked, the visitor's email program will open an email that contains the form data, and they will need to send the email to you.
To use the mailto method, right click in the form area and select properties. In the action field, enter mailto:email@example.com and form method as post.
Form elements must also have a Name to identify them. To add a name, right click the element and left click Properties.
To ensure the email is sent as a text message, include encType=text/plain in the form tag.
For example, in source view <FORM action=mailto:firstname.lastname@example.org method=post encType=text/plain>
Using a script (program)
When a script is used, the form data will be sent to the script on your web server, and the script will send you an email that contains the data. A free, easy to set up mail script is 'Formmail'. Your web hosting company can help you set up the formmail script if needed. For information about Formmail, see http://www.scriptarchive.com/formmail.html
To enter the script action and method, right click in the form area and select properties. In the action field, enter the path to your script. eg. formmail.cgi
The form method to select will depend on what your script is expecting. (usually post)