I am using django-crispy-forms and wondering how to disable autocomplete for a specific field. The field is a forms.IntegerField
that is prependedtext.
p_number = forms.IntegerField()
helper = FormHelper()
helper.form_class = 'form-horizontal'
helper.layout = Layout(
Row(
PrependedText('p_number', 'P',css_class='input-xlarge'),
Submit('submit','Submit', css_class='btn-primary'),
)
)
The crispy-forms way of doing this would be as easy as:
PrependedText('p_number', 'P', css_class='input-xlarge', autocomplete="off"),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With