`alt` is not a tag, it's an attribute.

Also, although some browsers show an `<img>`'s alt attribute as a
tooltip, this is nonstandard. The `title` attribute is what should be
used for a tooltip, and it works on all elements.

In short,

<?php e($form->text('contact_name', array('title' => 'Contact Name',
                                        'value' => '',
                                        'style' => 'width: 80%')));
        ?>

This will make "Contact Name" appear in the tooltip when the text box
is hovered.

hth
grigri

On Jul 15, 11:50 am, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> I'm happy to be corrected, but I think the 'alt' tag only exists for images 
> (that's HTML, not Cake).
>
> Also interested to see you using inline styles - are you not using CSS?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 15 Jul 2010, at 11:42, Master Ram wrote:
>
> > Hi,
>
> > how to set "alt" tag for text box, in cakePHP.
>
> > i used like this.
> > <?php e($form->text('contact_name', array('alt' => 'Contact Name',
> >                                        'value' => '',
> >                                        'style' => 'width: 80%')));
> >        ?>
>
> > its not working .
>
> > where i missed out.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to