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

How to display check boxes horizontally? #80

Open
dariushazimi opened this issue Mar 13, 2018 · 1 comment
Open

How to display check boxes horizontally? #80

dariushazimi opened this issue Mar 13, 2018 · 1 comment

Comments

@dariushazimi
Copy link

Is there any way to display the checkboxes horizontally instead of them listing vertically on the page?
Displaying them horizontally would take less space.

Thanks

@blag
Copy link
Collaborator

blag commented Mar 15, 2018

Yes there is! But you will have to do some coding to accomplish it.

If I remember correctly, you should be able to subclass multiselectfield.forms.fields.MultiSelectFormField and override the render member function, then use that class in your form.

Like this:

from multiselectfield.forms.fields import MultiSelectFormField


class HorizontalMultiSelectFormField(MultiSelectFormField):
    def render(self):
        # Build a custom HTML string here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants