Re: QuickForm error formatting

From: Date: Wed, 26 Apr 2006 01:03:56 +0000
Subject: Re: QuickForm error formatting
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23832@lists.php.net to get a copy of this message
In case I didn't make myself clear, there are lots of <td>, <tr> and other html code formatting in beteween each element. When I validate, all the error messages are at the top of the form, for example: (form starts here) EMAIL IS NOT VALID ZIP CODE IS EMPTY (actual form input begins here) NAME input field here EMAIL input field here ZIP input field here (form ends) What I'm aiming at is getting the error messages above the input fields like NAME, EMAIL and ZIP, for example. Thanks for your time! ----- Original Message ----- From: James Reinke To: pear-general@lists.php.net Sent: Tuesday, April 25, 2006 7:48 PM Subject: QuickForm error formatting Greetings all. Just wanted to say I appreciate your helpfulness over the last few weeks. I've posted some questions and there have been some great responses that have helped a lot. That being said, let me get to the nitty gritty. My problem arises in the way I format the error codes. I have a bunch of forms, submitted across tons of pages. It's working great using sessions and HTML QuickForms for individual pages. The problem arises in the formatting of the error codes though.. This is happening because unfortunately there is a lot of unique code for many of the fields. So the layout of the QuickForm is lots of addElement('input', ....) fields, followed by scattered addElement('static', ....). Because I'm inserting so many static elements, when the form validates, it shoots out the error at the top of the form. I'm thinking right now it could probably be done by using individual addElement fields for every input field. I'd just like to clean it up and have more control over where the error fields are printed out, and with all the static content it looks like I'll be making all of the addElement's unique, and include the static content that way. That sound like what you guys would do? Please advise and thanks in advance. _____________________ James Reinke CLEVERSAFE http://www.cleversafe.org jreinke@cleversafe.com _____________________

« previous php.pear.general (#23832) next »