Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 07:18 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default Zend form question

Hello,

I'm quite new to the zend framework so excuse me if I ask simple questions, you can believe me, they are not simple for me

I'm trying to make a zend form that lets you register. I have the form itself and it works just fine, except for one thing.

The form I want has to have a user image (avatar kind of thing) that he can change. I already found a way to upload the avatar but I haven't found something to display it on that page, right before the upload button...

If someone could give me some pointers it would be great! Google didn't help much
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-24-2008, 08:26 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

I found a solution. Basicly you can do this:

$imageTag = new Zend_Form_Decorator_HtmlTag();
$imageTag->setOption('openOnly', true);
$imageTag->setTag('img');
$imageTag->setOption('src', 'buh.gif');
$imageTag->setOption('placement', Zend_Form_Decorator_Abstract::PREPEND);

and then use addDecorators(array($imageTag)); on whatever form element you want.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:58 PM.