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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:12:26+00:00 2026-06-11T14:12:26+00:00

I have a multiselect in html file like this: <select multiple id=mymultiselect name=mymultiselect> <option

  • 0

I have a multiselect in html file like this:

<select multiple id="mymultiselect" name="mymultiselect">         
        <option value="1">this</option>       
        <option value="2">that</option>       
        <option value="3">other thing</option>
</select>

When I access the mymultiselect field in flask/python via:

request.form['mymultiselect']

or by using the request.args.get function it only returns one selected item. I’ve learned that to get all the selected items I have to add [] to the name of the field, like so:

<select multiple id="mymultiselect" name="mymultiselect[]">       
        <option value="1">this</option>       
        <option value="2">that</option>       
        <option value="3">other thing</option>
</select>

I can see by viewing the post data in firebug that this is working, but I anytime I try to access this field in flask/python it comes back as null or None.

How do you access these multiselect form fields that have “[]” at the end of their name? I’ve tried appending “[]” to the field name in the python code as well but that does not seem to work.

  • 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-11T14:12:27+00:00Added an answer on June 11, 2026 at 2:12 pm

    You want to use the getlist() function to get a list of values:

    multiselect = request.form.getlist('mymultiselect')
    

    You do not need to add [] to the name to make this work; in fact, the [] will not help, don’t use it at all.

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

Sidebar

Related Questions

I have the following multi select box in a HTML form: <select multiple=multiple name=fruits>
I have a multiselect control that looks like this (sorry for the long id
I have a multiselect dropdown box and a input as below: <select name=offer_type multiple=multiple>
I have a multiselect dropdown inside a table <td> <select multiple=multiple name=multiple id=multiple class=required>
How do you preselect an option in a multiple select html tag using jquery's
I have a standard select multiple HTML Input field, for example: <select multiple=multiple size=5
What is wrong with this code? I have a multiselect (VendorIDs) and a select
I have the following multi-select box in a HTML form, where user can select
I have multiple multi-select boxes with the same class and i want to unselect
I have two multi-select lists in HTML - one of categories, and another of

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.