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

  • SEARCH
  • Home
  • 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 1027509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:15:02+00:00 2026-05-16T12:15:02+00:00

I am using the Zend Framework and have setup a normal Zend Form, what

  • 0

I am using the Zend Framework and have setup a normal Zend Form, what I want to try to achieve is to have a button (with some javascript) that says add more and it adds another drop down menu same as the one setup in the zend form (a clone of it).

basically when the button is clicked it adds another select box like so:

<select name="type[]"> ...</select>

I can do a copy of the multi select box with a different name and insert it in the DOM and catch the post from the controller outside of the Zend form but what I was wondering if there is a proper way to achieve this and be able to validate and populate the extra fields when editing a current data stored in db if there are any extra.. Any help is appreciated, thanks.

  • 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-05-16T12:15:03+00:00Added an answer on May 16, 2026 at 12:15 pm

    Well remember that in your controller if you have something like:

    $this->form = new Form_Someform();
    

    You can always do:

    $this->form->addElement(etc...)
    

    Right before using isValid() or populate.

    So in your controller when someone submits the form, when creating your form object you could check if any select were created dynamicaly and then create corresponding Zend_Elements and just validate against that.
    Also when you reload that form you just create elements depending on whats in your database.

    You could also use the forms constructor to pass in an array of selectboxes and create then right there too. Thats what I do.

    The important things to remember is that you have control on the constructor and on the form object between its creation and the use of the populate() and isValid() functions.

    Hope this helps.

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

Sidebar

Related Questions

I am using Zend Framework I have a form that allows me to create
I am currently using the Zend Framework and have an upload file form. An
Server side extjs form validation using zend framework I have extended Zend_Form class to
I'm using Zend Framework and I currently have an existing form using zend-form which
I have a website running using Zend Framework and am trying to setup Zend
I have a CMS application written using the Zend Framework that allows you to
I have been building a dynamic form in my Zend Framework application using Jquery
I have a PHP MVC application using Zend Framework. As presented in the quickstart,
i have a problem with upload mutilply files using zend framework on server actually
I'm trying to develop a site using Zend Framework, but i have a problem:

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.