You have probably encountered forms many times on the web, especially for ecommerce and feedback forms. The format is typically some number of text fields, check boxes, radio buttons, combo boxes and a submit button. When you click on the submit button, the data from the form is sent to the web server as a HTTP POST. The web server then parses the data and takes appropriate action.
A form is created in HTML by the <form> tag. User input is accomplished using the <input> tag, representing text fields, check boxes, radio buttons, etc. For example, the web page below creates a form with a text field. It also uses the CPPCALL tag feature to populate the text field with a value.
The processing mechanism is a callback similar to what we did with the GET handler. When a post is sent a number of events will occur and can be processed by your callback function.
eStartingPost | Occurs once at the first event of a post |
eVariable | Occurs once for each variable in the form |
eFile | Occurs if a file is being posted |
eEndOfPost | Occurs once at the end of post processing |
In this example we are copying the value entered in the text field to the variable testForm1.