Usage examples
Creating the form in "table mode"
Creating a form in "table mode" means that the package returns the complete form in a fixed width table. Whilst this does not work very well for most frontend websites, it is a very convenient way to create forms during development phase or for backend systems where the design does not matter (much).
Пример 43-1. Creating a form
|
This will display a table where the left column holds the labels of the different fields. In the right column the different fields are placed.
Displaying single form tags
Apart from retrieving the table as a whole, one can also use the API of HTML_Form to directly display single form tags.
Пример 43-2. Directly displaying form tags
|
The above example will print the HTML markup being necessary to render a text input field. It will not print the surrounding <form /> tag or something else!
Returing single form tags
Similar to displaying form tags with the display*() functions HTML_Form can also return the tag instead of printing it.
Пример 43-3. Returning form tags
|
The variable $str now contains HTML markup like <input type="password" name="password" />.
Пред. | Начало | След. |
Introduction | Уровень выше | HTML_Menu |