How to show only the input field in Django crispy form.
<div class="">
{{form1.username|as_crispy_field}}
</div>
how can it only show input field
How to show only the input field in Django crispy form.
<div class="">
{{form1.username|as_crispy_field}}
</div>
how can it only show input field
If you want to remove labels from certain fields then you can do so by adding this to the Class
responsible for your form.
self.fields['some_field'].label = False
Where some_field
is the name of the field whose label you want to remove.
You can also see the answers here for different solutions to this problem.