Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Building AutoComplete Inputs with PHP, PEAR, Dojo and YUI
Feb 04, 2009 @ 15:29:25

The Zend Developer Zone has a new tutorial posted (from Vikram Vaswani) about adding in an auto-complete input field to your site. His example uses a PEAR class, Dojo and some components of the YUI libraries.

Fortunately, modern programming toolkits like Dojo provide ready-made widgets that have the necessary client-side functions for autocomplete. Add a little bit of server-side glue, in the form of a PHP script that talks to a database to generate valid suggestions, and enabling this functionality in a Web application now becomes a matter of hours, rather than days. In this article, I'll show you how to do this using three different libraries: PEAR HTML_QuickForm, YUI, and Dojo. Come on in, and find out more!

He shows how to combine Dojo, YUI and the HTML_QuickForm PEAR package to create a field that, based on what they enter into the input field, searches a database to find values in that table.

tagged: autocomplete input field tutorial yui dojo pear htmlquickform

Link:

Zend Developer Zone:
Generating and Validating Web Forms With PEAR HTML_QuickForm (part 2)
Jan 22, 2008 @ 07:57:00

The Zend Developer Zone has released part two of a series (here's part one posted back in November) looking at making forms for your website with the help of the PEAR HTML_QuickForm class.

I'll be discussing some of the package's non-standard form elements, teaching you how to combine elements into groups, showing you how to apply templates to control a form's appearance, and guiding you through the process of writing and registering your own custom validation rules.

There's plenty of sample code and screenshots to go around in this second part including examples of form auto-completion, multi-select elements and and example of its integration with Smarty.

tagged: form generate validate pear htmlquickform series

Link:

ONLamp.com:
Quick and Clean PHP Forms
Sep 14, 2007 @ 07:57:00

On O'Reilly's ONLamp.com website today, there's a new tutorial posted walking you through the creation of online forms through the amazingly helpful PEAR HTML_QuickForm package.

As its name suggests, the PHP Extension and Application Repository (PEAR) library called HTML_QuickForm can be used to quickly and cleanly to produce validating HTML forms, relieving the developer of the tedium that often accompanies such tasks. [...] This tutorial presents a basic implementation of HTML_QuickForm to produce a common email contact form and explores ways to get the most from this powerful library.

They introduce the topic by explaining when is a good time to use the package. Now that you're sure you want to use it, they move on to the code portion of the tutorial - the creation of an email form. They define the fields (their labels, types and required status) and show how to dump that array into the HTML_QuickForm class to create the HTML field output. They also add validation rules to check the contents of the field - in this case, ensuring that all of the entries have values and aren't empty.

tagged: pear htmlquickform form tutorial package pear htmlquickform form tutorial package

Link:

ONLamp.com:
Quick and Clean PHP Forms
Sep 14, 2007 @ 07:57:00

On O'Reilly's ONLamp.com website today, there's a new tutorial posted walking you through the creation of online forms through the amazingly helpful PEAR HTML_QuickForm package.

As its name suggests, the PHP Extension and Application Repository (PEAR) library called HTML_QuickForm can be used to quickly and cleanly to produce validating HTML forms, relieving the developer of the tedium that often accompanies such tasks. [...] This tutorial presents a basic implementation of HTML_QuickForm to produce a common email contact form and explores ways to get the most from this powerful library.

They introduce the topic by explaining when is a good time to use the package. Now that you're sure you want to use it, they move on to the code portion of the tutorial - the creation of an email form. They define the fields (their labels, types and required status) and show how to dump that array into the HTML_QuickForm class to create the HTML field output. They also add validation rules to check the contents of the field - in this case, ensuring that all of the entries have values and aren't empty.

tagged: pear htmlquickform form tutorial package pear htmlquickform form tutorial package

Link:

PHPBuilder.com:
PEAR's HTML_QuickForm
Oct 25, 2006 @ 14:29:00

PHPBuilder.com has posted a brand new tutorial today covering the installation and use of one of the most popular PEAR packages - HTML_QuickForm.

It makes handling the rendering and display of forms, and more usefully, both client and server-side validation, quick and easy. This article will take you through the basics of that package. It assumes familiarity with HTML form elements, and reasonably basic PHP skills.

Thanks to the PEAR installer, setting the package up on your machine is a snap. They also point out that you'll need the HTML_Common package to get things working. They move on to creating a simple form - showing how to add the elements and what the output looks like. There's even information on adding input validation (you do validate your input, don't you?) and doing a bit of formatting for the layout of the elements.

tagged: pear package htmlquickform tutorial basic validation layout pear package htmlquickform tutorial basic validation layout

Link:

PHPBuilder.com:
PEAR's HTML_QuickForm
Oct 25, 2006 @ 14:29:00

PHPBuilder.com has posted a brand new tutorial today covering the installation and use of one of the most popular PEAR packages - HTML_QuickForm.

It makes handling the rendering and display of forms, and more usefully, both client and server-side validation, quick and easy. This article will take you through the basics of that package. It assumes familiarity with HTML form elements, and reasonably basic PHP skills.

Thanks to the PEAR installer, setting the package up on your machine is a snap. They also point out that you'll need the HTML_Common package to get things working. They move on to creating a simple form - showing how to add the elements and what the output looks like. There's even information on adding input validation (you do validate your input, don't you?) and doing a bit of formatting for the layout of the elements.

tagged: pear package htmlquickform tutorial basic validation layout pear package htmlquickform tutorial basic validation layout

Link: