Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework General discussions > General Q&A on Zend Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-2010, 12:23 PM
Member
 
Join Date: Oct 2009
Posts: 81
Default Form Decorator stops Zend_Form from completing

I've just found a strange issue with a form which works as intended but when I use a viewscript form decorator to format it - it ceases to work. The form posts to an action that validates and then redirects. When the formdecorator is included the page just reloads as if the form failed validation although no error messages are shown. The form includes a file upload field - I'm not sure if this is an issue as I seem to remember reading that altering the decorator of file upload elements is a bad thing. I wasn't aware this would be an issue though if I;m using a form decorator and not customizing the element decorators.

Any ideas as to what may be causing this as I've been using form decorators often without any issues?

Many thanks,

Tony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-11-2010, 02:00 PM
Member
 
Join Date: Oct 2009
Posts: 81
Default

In case anyone else encounters the same issue. When using a viewscript form decorator. The attributes also need to be included in the form decorator.

In the case of a multipart enctype required for a file upload. The enctype must be set in the form and then the attribute must be included in the decorator with the line:

Code:
enctype="<?php echo $this->element->getAttrib('enctype') ?>"
Simple, yet annoyingly easy to miss.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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 06:49 PM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0