question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
zoidbergwillcommented, Oct 12, 2017

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?

1reaction
carltongibsoncommented, Sep 28, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found