Skip to content
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

Boolean field checkbox doesn't work #87

Closed
aminalaee opened this issue Mar 15, 2022 Discussed in #86 · 7 comments · Fixed by #88
Closed

Boolean field checkbox doesn't work #87

aminalaee opened this issue Mar 15, 2022 Discussed in #86 · 7 comments · Fixed by #88
Labels
bug Something isn't working

Comments

@aminalaee
Copy link
Owner

Discussed in #86

Originally posted by maxiaojunwolf March 15, 2022
here is my ORM Field:

    picture = Column(Boolean, default=False)

20220315-224244

@aminalaee aminalaee added the bug Something isn't working label Mar 15, 2022
@aminalaee
Copy link
Owner Author

Thanks for reporting this.

Even though this will fix checkbox in create and edit pages. In list and detail pages we show True/False values for boolean field, I think it'd be useful to show disabled checkboxes instead. Any suggestions?

@Args
Copy link

Args commented Mar 18, 2022

I encountered the same problem in version 0.1.6.

@aminalaee
Copy link
Owner Author

Yes you're right. This will be available 0.1.7 in a few days.

@Args
Copy link

Args commented Mar 19, 2022

Thanks a lot~

@Rivosoa
Copy link

Rivosoa commented Jul 5, 2022

I encountered this problem in version 0.1.11.
I had to specify the class on form_widget_args to make it work
form_widget_args = dict(active={"class": "form-check-input"})

@aminalaee
Copy link
Owner Author

This should be already included with the Boolean, if you think otherwise feel free to create a PR for the fix.

@Rivosoa
Copy link

Rivosoa commented Jul 10, 2022

This should be already included with the Boolean, if you think otherwise feel free to create a PR for the fix.

I don't have much time now to create a PR for it. But I searched it a bit and found the problem happens when you override a field as a BooleanField.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants