morning mate,
i'm pretty sure you can access the HTML the HtmlHelper uses in the
following file:
/cake/config/tags.ini.php
actually, looking at it, tagErrorMsg is one of the only functions that
doesn't refer to this file at all.
in the HtmlHelper:
/cake/libs/views/helpers/html.php
you can see that it returns the following:
return sprintf('<div class="error_message">%s</div>', is_array($text)
? (empty($text[$error - 1]) ? 'Error in field' : $text[$error - 1]) :
$text);
you *could* change it here but it's not recommended as next time you
update your Cake version you'll overwrite this.
what you could do instead is write your own helper that includes a
similar function. this could be a wrapper that removes the DIV or a
function very similar to this one. If you have a look at the function
you can see what it's doing and replicate it.
HTH
freedom
On 05/10/06, Christiaan Ottow <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm running into a minor problem with cake. I use the
> $html->tagErrorMsg function to show error messages in user input. This
> function prints a <div> with class error_message. It seems like this
> output is hardcoded into the HTML helper.
> The problem is this: I want to mark errorous fields with a *, right
> behind the input box. Using $html->tagErrorMsg, the * will be on a new
> line since it prints a <div> first. Of course I could try solving this
> with the float:left CSS property or other hacks, but it would be better
> to fix this at the source.
>
> So, is there a way to set the error output strings without changing the
> source of cake (and having to patch it everytime from then)? Or should
> this be a feature request / bug report?
>
> Best regards,
>
> Chris
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---