Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 25th, 2008, 02:00 AM
Authorized User
 
Join Date: Oct 2006
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to snowbydave1
Default Implement HTML elements in my template with Zend

Dear Friends,


I had to implement HTML elements in my own web designed template. But coding is Zend Based. I had use following class for creating HTML element in Zend.

        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('User Name')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty')
        ->addValidator('alnum')
        ->addValidator('regex', false, array('/^[a-z]+/'))
        ->addValidator('stringLength', false, array(6, 20))
        ->setRequired(true)
        ->addFilter('StringToLower');

$this->addElements(array($id, $username, $firstname, $email, $pws, $submit));

Above will automatically add label on top of each input element. While I have to use classes and seperate Label and element.

Pl guide me.


Thanking you,


Snowby Dave






Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove orphaned html elements from html string pauliehaha C# 2008 aka C# 3.0 2 June 30th, 2008 09:40 AM
display out of order html elements? chobo XSLT 2 April 1st, 2008 02:28 AM
XSLT: ONE template to transform all the elements Behl_Neha XSLT 8 December 15th, 2007 07:31 PM
Using xml elements as html attributes chipmaster XSLT 4 June 26th, 2007 10:22 AM
HTML table with missing values (elements) go4java XSLT 6 July 10th, 2006 03:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.