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"><img src="/jammer/cl134/img/
resetpasswd.png" alt="Edit" />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
--
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