Skip to content

Checkbox and Radio Button-groups #8919

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

Closed
eugenesaur opened this issue Jul 31, 2013 · 6 comments
Closed

Checkbox and Radio Button-groups #8919

eugenesaur opened this issue Jul 31, 2013 · 6 comments

Comments

@eugenesaur
Copy link

Hi guys! Love your work!

Have some issues with checkbox and radio Buttons on Button-groups. I've try to pre-load option with a form, but got all buttons disabled. Hope you'll fix it.

Thank you!

@cvrebert
Copy link
Collaborator

Gonna need a more concrete example of the problem(s) you're seeing.

@eugenesaur
Copy link
Author

I have a form-element default value for checkbox or radiobutton. I use 'data-toggle="buttons"' instead of simple checkboxes. So, when I try to set "selected=selected" for this element it appears as non-selected.

Thank you!

@cvrebert
Copy link
Collaborator

If you could put together a jsFiddle, that would be great.

@eugenesaur
Copy link
Author

http://jsfiddle.net/Dqfq8/1/

There are 2 examples with buttons and checkboxes

@fat
Copy link
Member

fat commented Aug 1, 2013

you need to add the active class yourself

@fat fat closed this as completed Aug 1, 2013
@dvburg
Copy link

dvburg commented Aug 5, 2013

Maybe this helps. Its how to add the active class automatically...

$("form").bind("reset", function (e) {
setTimeout(function () {
$('input[type=radio]').parent().removeClass('active');
$('input[type=radio]:checked').parent().addClass('active');
}, 50);
});

$('input[type=radio]').parent().removeClass('active');
$('input[type=radio]:checked').parent().addClass('active');

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

4 participants