Re: question on HTML_Quickform error message & smarty
| From: | Justin Patrin | Date: | Mon, 14 Mar 2005 17:56:37 +0000 |
| Subject: | Re: question on HTML_Quickform error message & smarty | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18061@lists.php.net to get a copy of this message | ||
On Mon, 14 Mar 2005 12:41:19 -0500, Richard Harding <rick@ricksweb.info> wrote:
> Justin Patrin wrote:
>
> >On Mon, 14 Mar 2005 12:23:20 -0500, Richard Harding <rick@ricksweb.info> wrote:
> >
> >
> >>I have a login form using HTML_Quickform and a smarty template. I seem
> >>to be having trouble getting the error message to show if the login
> >>fails. I have a custom rule that seems to be working according to the
> >>smarty debugger. I have error values set, but I can't seem to get them
> >>to show back in the form at all.
> >>
> >>Below is relevant code from both the php file, the .tpl, and the smarty
> >>debugger on a form submit
> >>
> >>Thanks for any help.
> >>
> >>Rick
> >>
> >>................
> >>
> >I don't see anywhere in your Smarty template where you're outputting the error.
> >
> >
> >
> From an example I have been working off of I thought by setting the
> renderer the error should be pulled in with the output of the html. Am I
> mistaken here?
>
As you can see from your debug output the errors are in a seperate
array, so you need to use that seperate array to output them. At
least, I *think* this is what you need to do (addmittedly I've never
used QF with Smarty, but I've seen other threads with this problem).
You need to do:
{$form_data.errors.fields}
in the "fields" section. You should also do this for any other fields
in your form which have rules (you may just want to do it for all of
them so that you don't accidentally miss one).
--
Justin Patrin