Hi All,

Fiddling around with Zend_Form_Element and extending it I created a F500_Form_Element_File (temporary, untill Zend one finally comes around...). I also added a decorator called "Progress" to automatically add the needed HTML for an upload progress bar, but in doing so I need some extra parameters - which automatically end up in the <input type="file"> tag...

<input type="file" name="upload" id="upload" value="" class="large" formid="fileupload" statustemplate="status template #{complete} of #{total}: #{percent}%">

I found the following in the manual:
"By default, all attributes are passed to the view helper used by the element during rendering, and rendered as HTML attributes of the element tag."

I also found an issue in the tracker already:
http://framework.zend.com/issues/browse/ZF-3052

Is there currently any way to avoid the attributes getting set in the element tag? (I have implemented it in the Progress decorator with a $_blacklistedAttributes for now but I wanted to ask if there is a more "general" way...)

Kind regards,


Ramon

ps: for those interested - my code was based on an exellent article I found regarding file uploads and progress bars: http://www.phpriot.com/articles/php-ajax-file-uploads
It depends on APC, and utilizes the prototype javascript library...

Reply via email to