php - Zend_Form array of inputs -


using zend_form, how create form elements this:

<input type="file" name="file[]" value="" /> <input type="file" name="file[]" value="" /> 

if don't know how many files user want upload. settings input type="file"

form.elements.file.type = "file" form.elements.file.options.required = true form.elements.file.options.label = "file" form.elements.file.options.validators.extension.validator = "extension" form.elements.file.options.validators.extension.options.extension = "gif,jpg,jpeg,png,swf" 

please try this

    $image = new zend_form_element_file("image");     $image->setattrib('multiple', true)            ->setisarray(true)            ->addvalidator('extension', false, 'gif,jpg,jpeg,png,swf'); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -