Graphic Design
  Home arrow Graphic Design arrow Page 4 - Using HTML Quickform for Form Processing
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
GRAPHIC DESIGN

Using HTML Quickform for Form Processing
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 147
    2004-09-01

    Table of Contents:
  • Using HTML Quickform for Form Processing
  • Steps for the Example
  • Individual Elements
  • Text, Password, Textarea
  • Hidden, Select
  • Checkbox, Radio
  • Submit, Reset, Button, Image
  • File, advcheckbox, Static
  • Header, Link, HTML
  • Element Groups
  • Processing Submitted Data
  • Without a Callback Function
  • Setting Validation Rules

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Using HTML Quickform for Form Processing - Text, Password, Textarea


    (Page 4 of 13 )

    The text element produces the single-line text-entry box displayed by the HTML tag <input type="text">.

    These are the valid arguments when creating a text 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 These are its methods:

    • setSize(): The size attribute controls the width of the displayed text box.

    • setMaxlength(): The maxlength attribute tells the browser how many characters can be typed into the text box.

    The following is a sample usage:

    $form->addElement('text','first_name','First Name:','class="big"');

    This is the sample HTML:

    <tr>
    <td align="right" valign="top"><b>First Name:</b></td>
    <td valign="top" align="left"><input class="big" name="first_name" type="text"
    /></td>
    </tr>

    password

    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.

    The following is a sample usage:

    $form->addElement('textarea','profile','Describe yourself:','wrap="soft"');

    The following is the sample HTML:

    <tr>

    <td align="right" valign="top"><b>Describe yourself:</b></td>

    <td valign="top" align="left"><textarea wrap="soft" name="profile">

    </textarea></td>

    </tr>

    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.

    More Graphic Design Articles
    More By Apress Publishing


       · Any idea what version this comes in for the PEAR distribution?
       · If you follow the example code for uploading a file you may get frustrated that the...
       · Sorry,but I'd rather work in the old fashion way. You have much more control...
       · I think page 13 of the article, "Using HTML Quickform for Form Processing - Setting...
       · it's a really good tutorial. thank you again
       · Good intro, but you don't seem to have anything about setting default values, which...
       · Of course there is a method to set default values:e.g....
       · can you give me an example re: the client-side validation on custom rule.. the...
     

    GRAPHIC DESIGN ARTICLES

    - 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
    - The Pen is Mightier than the Brush Tool







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway