With HTML_QuickForm version 3.1, you can have a consistent look across all your forms and a simplified file upload. This chapter starts with the basics then shows you how to process submitted form data with HTML_QuickForm. (From the book, Essential PHP Tools: Modules, Extensions, and Accelerators, by David Sklar, Apress, 2004, ISBN: 159059280.)
The password element behaves just like the text element, but it is displayed with the <input type="password"> tag instead of <input type="text">. This means that text entered into a password box isn’t displayed as it’s entered. Instead, an asterisk or other symbol is shown in place of each character.
textarea
The textarea element produces the multiple-line text-entry area displayed by the HTML tags <textarea></textarea>.
These are the valid arguments when creating a textarea element:
$elementName: The name attribute of the element’s <input> tag
$elementLabel: The label of the element in the form
$attributes: Arbitrary element attributes, as a string or an associative array
The following are its methods:
setWrap(): The wrap attribute controls how lines are wrapped inside the textarea. soft means that the browser displays wrapped text but doesn’t send the line breaks with submitted data, hard means that wrapped text is displayed and sent to the server, and off means the browser does no wrapping on its own.
setRows(): The rows attribute controls how many lines of text are visible in the textarea at one time.
setCols(): The cols attribute controls the width of the textarea.
This chapter is from Essential PHP Tools: Modules, Extensions, and Accelerators, by David Sklar, (Apress, 2004, ISBN: 1590592808). Check it out at your favorite bookstore today.