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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:28:17+00:00 2026-06-02T02:28:17+00:00

I have a form with a combobox /*Business user type*/ $Busertype = new Zend_Form_Element_Select(Busertype);

  • 0

I have a form with a combobox

  /*Business user type*/
            $Busertype = new Zend_Form_Element_Select("Busertype");
        $Busertype ->setLabel('Business user type')
          ->addFilter('StripTags') //StripTags : Enlève les caractères HTML
              ->setRequired(true)
               -> setMultiOptions(array(
                                '0' => '-Select your business type-',
                    '1' => 'Owner',
                                    '2' => 'Suplier',
                                    '3' => 'Representative',
                                    '4' => 'Shop'
        ));

I want to retrieve the contents of the combobox, but when i do echo($busername) i retrieve the value of the combobox. So how can i display the content of the combobox

Part of the action

  $form = new Application_Form_Inscriptionbu(); 
     $this->view->form = $form; //nous assignons le formulaire à la vue pour affichagee
     if ($this->getRequest()->isPost()) {  //Le formulaire est-il posté ?
     $formData = $this->getRequest()->getPost(); // récupère les infos des formulaires

     if ($form->isValid($formData)) { //Si le formulaire passe la validation
        $v = $form->getValues();
        $busername =$v['Busername'];
        echo($busername);
    }
  • 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-02T02:28:20+00:00Added an answer on June 2, 2026 at 2:28 am

    If you would like to redisplay the text from the option selected, you can use getMultiOption.

    if ($form->isValid($formData)) { //Si le formulaire passe la validation
        $v         = $form->getValues();
        $busername = $v['Busername'];
    
        echo "You selected $busername which is called " . 
             $form->getElement('Busername')->getMultiOption($busername) . 
             '<br />';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ext.form.Combobox object that is dynamically populated by ext.data.JsonStore. The user can
I have form with user defined filters ( combobox with column names, combobox with
I have a sub form in Access: The CopyNo is a combobox that lets
I have one combobox on the window form and I have one method which
I have a System.Windows.Forms.ComboBox on a form and I want to capture the event
I have form where user submits field. Field can have letters, numbers, and punctuation.
I have some logic in the business layer that limits the ComboBox options according
I have a form with a ComboBox that provides a dropdownlist. On the comboBox's
Hi I have 3 Controls on my Razor Form. 1) combobox, 2) DropdownSelect 3)
I have a WPF form with a combobox and a textbox (both are databound

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.