Closed slackarea closed 4 years ago
in autocompleteselectmultiple.html there is:
<input type="text" name="{{name}}_text" id="{{html_id}}_text" value="" autocomplete="off" {{ extra_attrs }} />
Now, I tried to pass 'placeholder="Some text"' without success .
In my forms.py I have:
... group = AutoCompleteSelectMultipleField('groups', required=False, help_text='', widget={'placeholder': "Test"}) ...
But it doesn't work...
Finally! I found the solution:
widget_options={'attrs': {'placeholder': 'TEST'}})
it is an example to pass extra_attrs to the HTML template
Thank you!
in autocompleteselectmultiple.html there is:
<input type="text" name="{{name}}_text" id="{{html_id}}_text" value="" autocomplete="off" {{ extra_attrs }} />
Now, I tried to pass 'placeholder="Some text"' without success .
In my forms.py I have:
... group = AutoCompleteSelectMultipleField('groups', required=False, help_text='', widget={'placeholder': "Test"}) ...
But it doesn't work...