python - How to have a multiple select field in django in the form of a drop down box -


Any help is greatly appreciated, I'm a newbie in the DJ.

  class studentRegister (forms.Form): courseList = forms.ModelMultipleChoiceField (queryset = course.officeSoul ())   

Thank you and appreciate your time , I just want to modify this type of form so that I can choose two or more options at one time and return it to the list?

I think you can use the SelectMultiple widget. class studentRegister (forms.Form): course list = forms.ModelMultipleChoiceField (queryset = course.objects.all), widget = form. Select multiple)

If it does not meet your needs, then you can try to use it.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -