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 7556759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:56:40+00:00 2026-05-30T11:56:40+00:00

I have a form with three (3) Zend_Form_Element_Select()’s, and I include them all in

  • 0

I have a form with three (3) Zend_Form_Element_Select()’s, and I include them all in the addElements call.
Only the last one in the addElements array will show.

Here’s my form code:

class Form_MapBomForm extends Zend_Form {
    public function init($option = null) {
        parent::init($option);   

        // instantiate a numbered options list for the SELECT's
        $options = array(
            NULL  => ' - please select - ',
            1   =>  '1 (first)',
            2   =>  '2 (second)',
            3   =>  '3 (third)',
            4   =>  '4 (fourth)', 
            5   =>  '5 (fifth)',
            6   =>  '6 (sixth)', 
            7   =>  '7 (seventh)'
        );

        $pn_col = new Zend_Form_Element_Select('pn');
        $pn_col->setLabel('PN Column:')
            ->addMultiOptions($options)
            //->setRequired(TRUE)
            //->addValidator('NotEmpty')
            ;

        $qty_col = new Zend_Form_Element_Select('pn');
        $qty_col->setLabel('Qty Column:')
            ->addMultiOptions($options)
            //->setRequired(TRUE)
            //->addValidator('NotEmpty')
            ; 

        $first_row = new Zend_Form_Element_Select('pn');
        $first_row->setLabel('Start ROW For PN\'s:')
            ->addMultiOptions($options)
            //->setRequired(TRUE)
            //->addValidator('NotEmpty')
            ;

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Save Mapping');

        $this->addElements(array(  $pn_col, $qty_col, $first_row, $submit  ))
            ->setName('bommap')
            ->setMethod('post')
            ;
    }
}

I can switch the order of adding the elements, and regardless, only the last of the three SELECT’s shows with the submit button.

Please help.
~ Mo

  • 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-30T11:56:41+00:00Added an answer on May 30, 2026 at 11:56 am

    You are giving all the select elements the same name ‘pn’. Try giving them different names, e.g.:

    ...
    $pn_col = new Zend_Form_Element_Select('pn');
    ...
    $qty_col = new Zend_Form_Element_Select('qty');
    ...
    $first_row = new Zend_Form_Element_Select('f');
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In VB.net 3.5 SP1 I have a Windows Form with three DataGridView controls. One
I have an ASP.NET form with three text inputs, one each for Work Phone,
I have a registration form with a few fields. One of them looks like
I have a UserControl that consists of three TextBoxes. On a form I can
If I have a map of three countries, and their borders form the outline
I have a simple content edit form (Zend_Form) that I populate() with an array
How I can combine multiple form elements to one validator? I have address information
I have a Zend form with three select boxes. When the form is first
I have created a form with zend form. I process the data in one
I have a form where there are 6 items, each of which can be

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.