Hi. I dont think you can get user input pn a field with choices, but then you dont really need choices if you want users to be able to input anything. Choices are used when you only want to accept certain values like a list of countries, states, or whatever. It doesn't seem like you have thought through what should happen if a user want to sellect other. A select list is a good choice for choices but if you choose other then what? Do you want you select list to be transformed to a textfield? Do you want an extra textfield to write the other value? Or do you want to add an text field when you have selected other. There are many posibilities, some will need javascript, but I think you need to figure out how you want things to happen. Then you probably can find the best solution, maybe something else than choices.
On 18 Mar., 21:45, Psihonavt <psihon...@gmail.com> wrote: > hello, > have a question, in my model, i have filed, like: > > cpu_ch =( > ("Box","Box import"), > ("EOM","EOM import"), > ) > import_type = models.CharField(_("Import type"), max_length=5, > choices=cpu_ch, blank=True) > > I want to have a third choice in choices cpu_ch, for example, "other", > and when I choose this option, then I should be able to enter there > any string and save the filed with this value. > ps. sorry for my english > > thnx --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---