How to make a widget with no history?

33 views
Skip to first unread message

Yarick Antonov

unread,
Aug 31, 2014, 7:23:03 PM8/31/14
to django...@googlegroups.com
For example this widget: http://i.imgur.com/ExaZt8l.png

And as you can see there are the history of previous inputs.

And i need to get rid of that.

Meaning: i don't want any history of previous inputs to be displayed.

Collin Anderson

unread,
Sep 1, 2014, 12:48:16 PM9/1/14
to django...@googlegroups.com
You need to turn html autocomplete off.

class CommentForm(forms.Form):
    name
= forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'off'}))

which will generate html like this:

<input id="id_name" name="name" autocomplete="off">

Yarick Antonov

unread,
Sep 1, 2014, 5:48:28 PM9/1/14
to django...@googlegroups.com
Many thanks :) That's just what i need.
Reply all
Reply to author
Forward
0 new messages