Answer the question
In order to leave comments, you need to log in
Editable field with a choice?
Hello!
How to create a similar field in Django, where you can select from a list and edit if necessary?
For now, I found the django-floppyforms project and tried it out. In general, it has the same effect, it uses datalist , which does not lend itself to css styles. Is it possible to replace datalist with a ul list ?
forms.py:
class SymbolForm(forms.ModelForm):
symbol = floppyforms.CharField(widget=floppyforms.TextInput(datalist=['A', 'B', 'C'], attrs={'autocomplete': 'off'}))
class Meta:
model = Symbol
fields = ('symbol ')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question