[Answered ]-How to get list post data in django forms?

2๐Ÿ‘

โœ…

I suppose you mean that:

self.data.getlist('server_ids')

You can call it in a form class. e.g. in a clean method

Here is an example for your other question:

SERVER_CHOICES = (
    ('1', '1'),
    ('2', '2'),
    ('3', '3'),
)
server_ids = forms.MultipleChoiceField(
        widget=forms.SelectMultiple, choices=SERVER_CHOICES)

It is also helpful if you take a look at the documentations about Django widgets and forms

๐Ÿ‘คtrantu

Leave a comment