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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:19:03+00:00 2026-06-13T23:19:03+00:00

I am trying to use checkboxes in my HTML, return these checkboxes to my

  • 0

I am trying to use checkboxes in my HTML, return these checkboxes to my python backend, and then increment three counters if the box is clicked.

Right now my HTML is as follows and works fine:

<form method="post">
    <input type="checkbox inline" name="adjective" value="entertaining">Entertaining
    <input type="checkbox inline" name="adjective" value="informative">Informative
    <input type="checkbox inline" name="adjective" value="exceptional">Exceptional
</form>

and then on my python backend I have the following:

def post(self):
    adjective = self.request.get('adjective ')

    if adjective :
        #somehow tell if the entertaining box was checked
        #increment entertaining counter
        #do the same for the others
  • 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-13T23:19:04+00:00Added an answer on June 13, 2026 at 11:19 pm

    When your form has multiple checkboxes with the same name attribute, the request will have multiple values for that name when the form is submitted.

    Your current code uses Request.get to get a value, but this will only retrieve the first value if there is more than one. Instead, you can get all the values using Request.get_all(name) (in webapp) or Request.get(name, allow_multiple=True) (in webapp2). This will return a (possibly empty) list with all the values for that name.

    Here’s how you could use in in your code:

    def post(self):
        adjectives = self.request.get('adjective', allow_multiple=True)
        for a in adjectives:
            # increment count
            self.adjective_count[a] += 1 # or whatever
    
            # do more stuff with adjective a, if you want
    
        # do other stuff with the request
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use JQuery to highlight the checkboxes checked by a user,
I'm trying to use a select all checkbox to select a column of checkboxes.
I'm trying to use images as checkboxes. The following would work fine if it
I'm trying to use Dojo (1.3) checkBoxes to make columns appear/hide in a Dojo
I am trying to categorise checkboxes with category|productname values. I need to use the
I'm trying to use custom check boxes within Fancybox. They are showing up but
I have been trying to use/save the boolean value of a checkbox in other
i'm trying use facebook API to upload photo in my fan page. I downloaded
I am trying use gem tire to search in my application. I have tables
I was trying use a set of filter functions to run the appropriate routine,

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.