Working with Forms
Web forms provide a powerful way to interact with users. They provide a mechanism to include interface controls such as edit fields, list boxes, and buttons in order to extract information from the user and process the results by the server or a server application.
WebSuite supports standard HTML web form architecture and provides a powerful mechanism in Active Pages for additional processing and the creation of web-based applications.
Web forms start with the <FORM> tag and end with the </FORM> tag. Content, commands, and form controls can be embedded in-between.
A typical example of a web form is:
<FORM action="myform.htm" method="POST">
First Name: <INPUT type="TEXT" name="FNAME" size="20" value="">
Last Name: <INPUT type="TEXT" name="LNAME" size="20" value="">
<INPUT type="SUBMIT" value="Press this button to submit">
</FORM>
|
The first line identifies the form and includes the file to call when the form is submitted as well as the method to use when submitting the form. The most common methods include GET and POST. The GET method will include the results from the submitted form in the address URL when the action page is called, as in:
Myform.htm?FNAME=YourFirstName&LNAME=YourLastName
|
In this case, the action file is separated from the form controls and their data using the "?" character. Individual name/value pairs of the data are then further separated using the "&" character.
The POST method will call the action file but include the results of the form submittal embedded in the TCP/IP header. These can only be accessed programmatically.
Multiple forms may appear within a single web page but they may not be nested within each other.
WebSuite provides a host of functions for advanced manipulation of forms and form data using its Active Page technology. See the ACTIVE PAGE and WORKING WITH DATA sections of this guide for additional information.
Consult an HTML reference such as the one included on the DEVELOPERS page of the West Coast web site for additional information on working with forms.
(c) 2001 by West Coast Web Adventures, Inc., All Rights Reserved
|