+ Reply to Thread
Results 1 to 2 of 2

Thread: Form Decorator stops Zend_Form from completing

  1. #1
    topcatxx is offline Member
    Join Date
    Oct 2009
    Posts
    98

    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

  2. #2
    topcatxx is offline Member
    Join Date
    Oct 2009
    Posts
    98

    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.

+ Reply to Thread

Similar Threads

  1. Zend_Form - how do I switch decorator to Fieldset for RadioButton element
    By mgordon in forum Model-View-Controller (MVC)
    Replies: 2
    Last Post: 11-07-2009, 08:30 AM
  2. Zend_Form decorator
    By Ffreeman in forum General Q&A on Zend Framework
    Replies: 0
    Last Post: 05-19-2009, 10:04 AM
  3. Zend_Form Decorator not working?
    By altergothen in forum Core Infrastructure
    Replies: 1
    Last Post: 03-01-2009, 09:44 AM
  4. Zend_Form Decorator?
    By danield in forum General Q&A on Zend Framework
    Replies: 0
    Last Post: 02-15-2009, 04:17 PM
  5. Zend_Form Decorator There, but not found?
    By bpat1434 in forum General Q&A on Zend Framework
    Replies: 1
    Last Post: 08-09-2008, 02:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts