For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > April 2006 > Re: [PEAR] Re: QuickForm error formatting









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Re: QuickForm error formatting
Justin Patrin

2006-04-25, 9:59 pm

On 4/25/06, James Reinke <jreinke@cleversafe.com> wrote:
> In case I didn't make myself clear, there are lots of <td>, <tr> and othe=

r 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 l=

ike NAME, EMAIL and ZIP, for example. Thanks for your time!
>


Please send your e-mails to the list only once, not twice.

The default QF renderer renders the errors above each element. Are you
overriding the element template(s)? Check the default element template
for how the error is displayed.

>
> ----- 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 wee=

ks. I've posted some questions and there have been some great responses th=
at 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 be=
cause 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 s=
o 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 o=
ut, 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
> _____________________
>



--
Justin Patrin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com