2

How in DJANGO create editable select field as in the picture below?

enter image description here

I used before django-floppyforms app in my project. It use datalist which is unflexibility in css styling. So is it possible replace detalist to ul, li elements?

forms.py:

CharacteristicForm(forms.ModelForm):
    user_class = floppyforms.CharField(
       widget=floppyforms.TextInput(
          datalist=['A', 'B', 'C'],
          attrs={'autocomplete': 'off',}
       )
    )

    class Meta:
        model = Characteristic
        fields = ('user_class')
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
  • (I'm not sure if this is the kind of help you're looking for). I've used an app called [django-forms-builder](https://github.com/stephenmcd/django-forms-builder). It allows the admin to create fields that are dropdown choices like that ideia in the image, and others like multi-select or checkboxes. Good luck – S_alj Apr 29 '17 at 21:14
  • @S_alj Hello! It`s really interesting project but thats not what I am looking for. Do you have any ideas?! – Nurzhan Nogerbek Apr 30 '17 at 04:07
  • Unfortunately I haven't got other ideas for this :( – S_alj Apr 30 '17 at 18:09

0 Answers0