Reputation: 1073
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
Upvotes: 0
Views: 373
Reputation: 7744
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.
Upvotes: 1