-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkbox not visible #261
Comments
The issue is that with django 1.9 the input tag is wrapped into the label as can be seen here Example:
|
@PaoloC68 Did you see view this bug in latest versions? |
@SalahAdDin I can affirm that the bug is still on version 1.10 |
Really? Have you any idea? @f1nality Man? |
Here is the solution for Django 2.0 -> rewriting checkbox_option template admin.py
admin/forms/widgets/checkbox_option.html
|
As per your above solutions i have copy paste code but i am facing issues Please i need a solution urgent |
When I realized that my django admin with Jet was not rendering the checboxes, I found this issue still open here. After trying some steps with no luck, I found that this css property below cause the checkboxes not rendered. /jet/static/jet/css/_forms.scss
So I create custom css file to override the property. admin.py
static/css/checkbox-override.css
With this custom css, the checkboxes will be rendered in the add and change view. But you will see double checkboxes in the list view. So I remove the label from the list view with this css. static/css/checkbox-override.css
The double checkboxes will be removed from the list view. But sure, with this trick, it will only be rendered as a plain checkbox. |
Expanding on @tehdoorsareopen 's comment. The following works for Django 3.2.6, django-3-jet 1.0.8 and django-multiselectfield 0.1.12: <project>/settings.py (see: docs)
<app>/admin.py
<app>/templates/django/forms/widgets/checkbox_option.html
|
I am using checkboxes in a model which is using the django-multiselectfield field.
It is almost all fine except that the actual input checkbox is hidden by the css and cannot be set.
What can I do to render the input instead of having it hidden?
Thanks
The text was updated successfully, but these errors were encountered: