Bootstrap 4 custom checkboxes
See original GitHub issue- Package version: 1.6.2
- Django version: 1.11
- Python version: 3.6.2
- Template pack: bootstrap4
Description:
I am trying to use the bootstrap 4 custom checkboxes. I can’t find a clear way to do with the crispy templates. What I am doing now is using my custom template custom_bootstrap_checkbox.html
:
<label class="custom-control custom-checkbox mt-1">
<input name="{{ field.name|safe }}" id="{{ field.auto_id|safe }}" type="checkbox" class="custom-control-input">
<span class="custom-control-indicator"></span>
<span class="custom-control-description text-muted">{{ field.label|safe }}</span>
</label>
And then, in the helper Layout, adding the field as:
Field('field_name', template="pieces/custom_bootstrap_checkbox.html")
Those custom checkboxes are already implemented?
Do you think this custom checkbox must be a default if using bootstrap4 ??
The html seems to be hard to fit into template/bootstrap4/field.html
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Forms - Bootstrap
Be sure to explore our custom forms to further style <select> s. ... Checkboxes and radio buttons support HTML-based form validation and provide...
Read more >Bootstrap 4 Custom Forms - W3Schools
To create a custom checkbox, wrap a container element, like <div>, with a class of .custom-control and .custom-checkbox around the checkbox. Then add...
Read more >31 Bootstrap Checkboxes - Free Frontend
Using Bootstrap 4 custom checkboxes, build an elegant food form. Compatible browsers: Chrome, Edge, Firefox, Opera, Safari. Responsive: yes.
Read more >Style Bootstrap 4 Custom Checkbox - Stack Overflow
How do I style a custom checkbox in Bootstrap 4? I've tried everything but I can't even change its background color.
Read more >Bootstrap Checkbox - examples & tutorial
Bootstrap Checkbox is a component used for allowing a user to make a multiple choice. Broadly used in the forms and surveys.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I had to fiddle a bunch lately to get a pretty file browser too.
And +1 to tidying up
field.html
, it’s really scary and complicated.Maybe we should have a bigger issue to better support some of those elements that aren’t supported DCF elements at the moment?
I don’t really see this as an Issue, since the user land solution is easy enough. Happy to see it closed if we’re not going to do anything about it.