For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > September 2007 > Re: [PEAR] Interesting Quickform question









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] Interesting Quickform question
Justin Patrin

2007-09-12, 7:03 pm

On 9/11/07, Mr. Man <nickman@freemail.hu> wrote:
> Dear All,
> I'd like to ask you a small question. How can I echo an error message, if any error happened with the rules?
>
> I mean, that for example, I set a setElementError. If the error happened, I echo the erro message with getElement error.
>
> But I'd like to make, that if _any_ of the elements have error, then an error message will show on the page. This error message can be a php echo, or a static QF element, whatever.
>
> I tried with "__ALL__" but if I'm right it's only for the filters, so it didn't work.
>
> thanks for your help and input,


if (!$form->validate()) {
echo 'invalid';
}

--
Justin Patrin
Sponsored Links







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

Copyright 2008 codecomments.com