Yes, you are correct. I guess, I was being ignorant. Thanks. It works
now.

On Dec 7, 3:49 pm, euromark <[email protected]> wrote:
> why are you purposely setting 'escape'=>true?
> if you want to use html inside an element you are shooting yourself in
> the foot this way.
> it should rather by false then.
>
> On 7 Dez., 21:10, Blues Clues <[email protected]> wrote:
>
>
>
> > Hi:
>
> > I have a, hopefully, silly problem. Can you help ?
>
> > I have for Form->Button in my view that looks like this...
>
> > <?php echo $form->button('Edit', array('class'=>"btnEdit",
> > 'escape'=>true, 'type'=>"button")); ?>
>
> > Now, I would like to add a small img (png) before 'Edit' to make it
> > pretty.
>
> > <?php echo $form->button($this->Html->image("myimg.png", array("alt"
> > => "Edit"))."Edit", array('class'=>"btnEdit", 'escape'=>true,
> > 'type'=>"button")); ?>
>
> > But this is simply generating a button like this with the text below
> > embed (that's what UI shows)
>
> > <img src="/dev/134/img/myimg.png" alt="Edit" />Edit
>
> > & the HTML looks like this...
>
> > <button type="button" class="btnEdit">&lt;img src="/jammer/cl134/img/
> > resetpasswd.png" alt="Edit" /&gt;Edit</button>
>
> > I can't seem to get this work...Can someone help me with this please?
>
> > I have a similar code elsewhere and this works great but I am trying
> > to use form helper elements this time and I am not making progress....
>
> >     <button type="submit" class="test" name="test">
> >         <?php echo $html->image("myimg.png");?>
> >         Login
> >     </button>
>
> > -BC- Hide quoted text -
>
> - Show quoted text -

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to