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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:00:56+00:00 2026-06-02T10:00:56+00:00

My apologizes if this question was somewhere before, but I could not find anything.

  • 0

My apologizes if this question was somewhere before, but I could not find anything.

So, the question is really simple: is these any django native formfield that mimics the behavior of request.POST.getlist('something')?

In my UI, user creates a list of objects that he wants to save, and these objects are represented as a list of hidden inputs with the same name:

<input type="hidden" name="cc" value="1045">
<input type="hidden" name="cc" value="1055">
<input type="hidden" name="cc" value="1046">

request.POST.getlist does exactly what I need, but I don’t want to work with the request directly, I want do to it through the form.

  • 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-02T10:00:59+00:00Added an answer on June 2, 2026 at 10:00 am

    Thanks for the comment. Yes I found that ModelChoiceField is used to ManyToMany fields in models. On the form side, it is represented as MultipleChoiceField/TypedMultipleChoiceField.

    So I decided to subclass this field and override validate methods.

    class NotValidatedMultipleChoiceFiled(forms.TypedMultipleChoiceField):
        """Field that do not validate if the field values are in self.choices"""
    
        def to_python(self, value):
            """Override checking method"""
            return map(self.coerce, value)
    
        def validate(self, value):
            """Nothing to do here"""
            pass
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize if this question was asked already before but I could not find
Apologies if this question has been asked before, I couldn't find anything similar. I
I apologize if this question is something of the most simple, but I'm not
Apologies if I missed this question already, but I searched and couldn't find it.
I apologize if this a duplicate question (I didn't find anything like that). I'm
I apologize if this question was already asked but I can't seem to find
I apologize if this was asked somewhere else, but I do not know how
My apologizes if this has been covered before; I searched and searched but I
Apologies if this is somewhere, but I'm struggling to find the details I need
I apologize if this question has been asked before, but my case is a

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.