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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:29:17+00:00 2026-05-13T01:29:17+00:00

I have a modelchoicefield that has too many valid options to really show in

  • 0

I have a modelchoicefield that has too many valid options to really show in a menu. How can I tell Django forms to use another widget that won’t take up as much space rendering?

I want to use a HiddenField and I have another widget on the screen taht will populate it. If the hiddenfield has no value I keep getting form validation errors on it even though it is marked as required=false

  • 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-13T01:29:18+00:00Added an answer on May 13, 2026 at 1:29 am

    All you need to do is use the widget parameter of the form field definition…

    But the question really is what other widget would you like to use?

    There are some examples of autocomplete widgets. But nothing out of the box.

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

Sidebar

Related Questions

I have a form in Django that looks like this class FooForm(forms.ModelForm): foo_field =
Have a matrix report now that has Position, Hours and Wages for a location
I'm trying to write a Django-subclassed ModelChoiceField class that knows how to load itself,
I have a form in my Django app (not in admin) that allows staff
I have to add title attribute to options of the ModelChoiceField. Here is my
I have a Django Form class defined likes this in Models : class AccountDetailsForm(forms.Form):
I have form: class ItemForm(forms.ModelForm): id = forms.ModelChoiceField(queryset=Item.objects.all(), widget=forms.HiddenInput()) temp = forms.BooleanField(widget=forms.HiddenInput(), required=False) date
Have an app that can use tts to read text messages. It can also
I have form with such field: categories = forms.ModelChoiceField( queryset=Field.objects.all(), widget=CheckboxSelectMultiple, required=False ) And
I have the following form: class FeaturedVideoForm(ModelForm): featured_video = forms.ModelChoiceField(Video.objects.none() widget=make_select_default, required=False, empty_label='No Featured

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.