Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7774537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:24:16+00:00 2026-06-01T17:24:16+00:00

I want to upload multiple images using Zend_Form_Element_File with the HTML attribute multiple .

  • 0

I want to upload multiple images using Zend_Form_Element_File with the HTML attribute multiple. Setting up the element works intuitively:

$form->addElement(new Zend_Form_Element_File(
    'images',
    array('label' => 'Images:', 'multiple' => 'multiple')
));

When I get a reference to the input field in my upload page und do a $input->receive(), it only saves one of the selected files.

When I search for something like “Zend_Form_Element_File multiple files”, I only get results that show the use of Zend_Form_Element_File::setMultiFile(), which isn’t what I’m looking for.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:24:17+00:00Added an answer on June 1, 2026 at 5:24 pm

    Just found the answer to my own question:

    You have to set ‘isArray’ on the input element to true, either in the options array when constructing the element (new Zend_Form_Input_File('images', array('isArray' => true))) or via the isArray() method ($input->setIsArray(true)).

    Some background info and how I finally found this solution:

    First, I realized that I have to apend square brackets to the element’s name for multiple file uploads to work, e.g. images[]. I don’t know if that’s the HTML specification or if that’s something PHP requires, but that’s how it should work in this case.

    My next problem was that Zend_Form_Element removes the brackets when I try to set them with the name property. Finally, I stumbled upon the answer by Matthew Weier O’Phinney himself: isArray appends the [] for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to upload data, images, txt files, pdf documents , etc. Im using
I am using Jquery Uploadify for images upload with PHP, here i want to
I am using Jquery Uploadify for images upload with PHP, here i have multiple
Say I have a form that allows users to upload multiple images, which are
My web application creates multiple image thumbnail files when users upload images. I want
I want to use the Ajax-Upload script to upload multiple images. The kicker is
I want to use uploadify to upload my multiple images. What is scenario I
I'm using the script from http://webdeveloperplus.com/jquery/ajax-multiple-file-upload-form-using-jquery/ I modified the onComplete to add a link
I want a user to upload multiple images (+ thumbs) and give a description
I need to upload multiple images via form. I thought that I will do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.