First let's see such an example:
Firstform.php
// Create a form object $ form = new html_quickform ('frmtest', 'pos');
/ * Add four form elements to add an AddElement method for this object
The three parameters of addelemment indicate the type, name, and displayed text, respectively.
* / $ form-> addelement ('header', 'header', 'please login'); $ form-> addelement ('text', 'name ",' username: '); $ form-> addelement (' Password ',' Password ',' Password: '); $ form-> addelement (' Submit ',' Submit ',' Submit ');
// Output to the browser $ form-> display ();> body> html>
The output is as shown in the figure:
This method looks very cool J We can create a form quickly. Of course, this is not the main reason for us using Quickform, because using some visualized tools to create a form faster.
QuickForm can create a form element type:
TEXT
AutoComplete
Password
Textarea
Hidden
SELECT
Hierselect
Hiddenslect
Checkbox
Radio
Submit
RESET
Button
Image
File
AdvCheckbox
date
Static
HEADER
LINK
HTML