ZF-11563: zend_form_element_file creating a custom element ( )

Issue Type: New Feature Created: 2011-07-14T16:31:28.000+0000 Last Updated: 2012-02-23T23:52:32.000+0000 Status: Closed Fix version(s): Reporter: dwalker (pcmad) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Form

  • zend_form_element_file

Related issues: - ZF-8136



hi i would like to create a custom element where this element would have

1 file element 1 text element (for a caption for the file)

however the view helper it hard coded into the Zend_Form_Element_File class

why a want to create a combo element like this is because i got 10 files to upload on a page and if I have to use 2 elements instead of 1 combo element then there will be a lot more code to to create a work around or 2to3 times more calling to the data base which mean more server load

there is a related bug already mentioned but it seem is not an issue BUT it is because its the same issue i currently have.

Also this is the only element that does not have a value if there was just text to state a file name that already uploaded when form was populated that would make the user experience so much better


Posted by Adam Lundrigan (adamlundrigan) on 2012-02-23T23:52:19.000+0000

Reclassifying as minor new feature. The use case you describe is not in the scope of the current Zend_Form_Element_File / Zend_View_Helper_FormFile pair. What you will need to do is extend the existing elements to create a "combo element" class. An example of how this is done can be seen here (it's a three-field date element, but the principle is the same)…

Have you found an issue?

See the Overview section for more details.


© 2006-2019 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.