Django: How do I add arbitrary html attributes to input fields on a form? October 8, 2022 by Tarik Check this page city = forms.CharField(widget=forms.TextInput(attrs={'autocomplete':'off'}))