Monday, October 16, 2017

add prompts for drop down list

The form field are something like this:

    colours = (('r','Red'),('g','Green'),('b','Blue))
    # ...
    fave_colour = forms.ChoiceField(choices=colours)


I would like to add a prompt for each choice to help user select the choice properly. How can I add prompts for the choices drop down list?


Thanks. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4105498a-fa13-46a6-874e-eb2f86163473%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment