Home arrow Graphic Design arrow Page 9 - Using HTML Quickform for Form Processing
GRAPHIC DESIGN

Using HTML Quickform for Form Processing


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.)

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 193
September 01, 2004
TABLE OF CONTENTS:
  1. · Using HTML Quickform for Form Processing
  2. · Steps for the Example
  3. · Individual Elements
  4. · Text, Password, Textarea
  5. · Hidden, Select
  6. · Checkbox, Radio
  7. · Submit, Reset, Button, Image
  8. · File, advcheckbox, Static
  9. · Header, Link, HTML
  10. · Element Groups
  11. · Processing Submitted Data
  12. · Without a Callback Function
  13. · Setting Validation Rules

print this article
SEARCH DEVARTICLES

Using HTML Quickform for Form Processing - Header, Link, HTML
(Page 9 of 13 )

header

The header element is similar to the static element but only its label is displayed, and it has different formatting. This makes it useful for a header that sets off a section of a form.

These are the valid arguments when creating a header element:

  • $elementName: The name for HTML_QuickForm’s internal element array

  • $text: The text to display in the form The following is the sample usage:

$form->addElement('header','episode_4','A New Hope');

The following is the sample HTML:

<tr>
  <td nowrap="nowrap" align="left" valign="top" colspan="2" bgcolor="#CCCCCC">
<b>A New Hope</b></td>
</tr>

link

The link element generates an HTML <a> tag that is paired with a label in the form layout.

These are the valid arguments when creating a link element:

  • $elementName: The name attribute of the element’s <a< tag

  • $elementLabel: The label of the link in the form

  • $href: The target of the link

  • $text: The text to display in the form

  • $attributes:Arbitrary element attributes, as a string or an associative array

The following is the sample usage:

$form->addElement('link','pp_link','Privacy Policy:',
  'http://www.example.com/privacy.html', 'Click Here',
'_target="blank"');

The following is the sample HTML:

<tr>
<td align="right" valign="top"><b>Privacy Policy:</b></td>
<td valign="top" align="left"><a _target="blank" name="pp_link" href="http://www.example.com/privacy.html"<Click Here</a></td> </tr>

html

The html element inserts unmodified HTML into the rendering of the form. Because HTML_QuickForm displays form elements in table rows, take care to format HTML inserted with this element properly so that it fits into the form’s table.

This is the valid argument when creating an html element:

• $text: The HTML to display in the form The following is the sample usage:

$form->addElement('html','<img src="spacer.png"<');

The following is the sample HTML:

<img src="spacer.png">

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.

Buy this book now.


blog comments powered by Disqus
GRAPHIC DESIGN ARTICLES

- Customizing Wordpress Favicons and Gravatars
- Building Corner Effects with Transparent Bac...
- 3D Graphics Technology: VRML Part I - Introd...
- Creating Visual Effects
- Web Page Design Overview
- Creating Artistic Photographs
- Working with Tools in Paint Shop Pro 8
- Using HTML Quickform for Form Processing
- Introduction to Adobe FrameMaker
- WebLogic Workshop, WebLogic Platform, and th...
- Planning the Site
- Working with Web Services
- WebLogic Workshop Application Development Ba...
- Scanning Images for Web Use
- Web Graphics Overview

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials