I am using Simple_form, twitter bootstrap, and rails 3.2.2
Does anyone know if there is a way to use the "toggle button" option for bootstrap on boolean fields in a simple_form? I would like to replace the checkboxes with buttons.
Here is what I've tried so far with no luck in the form (rails):
On Sunday, April 15, 2012 at 2:04 AM, prodigerati wrote:
> I am using Simple_form, twitter bootstrap, and rails 3.2.2
> Does anyone know if there is a way to use the "toggle button" option for bootstrap on boolean fields in a simple_form? I would like to replace the checkboxes with buttons.
> Here is what I've tried so far with no luck in the form (rails):
> How does a "toggle button" relies to "an input field"? I see you're > generating an input field but wants a button?
> Perhaps I didn't get what you're trying to accomplish.
> -- > At. > Carlos Antonio
> On Sunday, April 15, 2012 at 2:04 AM, prodigerati wrote:
> I am using Simple_form, twitter bootstrap, and rails 3.2.2
> Does anyone know if there is a way to use the "toggle button" option for > bootstrap on boolean fields in a simple_form? I would like to replace the > checkboxes with buttons.
> Here is what I've tried so far with no luck in the form (rails):
But buttons don't give you the state required to send to the server, they're completely different than checkboxes, unless you add some javascript and a hidden field on top of that.
Anyway, it's not possible to create a collection of buttons using SimpleForm, mainly because they're not actually related to an attribute. It's up to you to generate and handle them.
On Monday, April 16, 2012 at 11:38 AM, prodigerati wrote: > Hi Carlos,
> I would like to replace checkboxes with buttons. If toggled then true, otherwise false.
> Thanks,
> Javid
> On Sunday, April 15, 2012 2:19:53 PM UTC-7, Carlos Antonio da Silva wrote: > > How does a "toggle button" relies to "an input field"? I see you're generating an input field but wants a button?
> > Perhaps I didn't get what you're trying to accomplish.
> > -- > > At. > > Carlos Antonio
> > On Sunday, April 15, 2012 at 2:04 AM, prodigerati wrote:
> > > I am using Simple_form, twitter bootstrap, and rails 3.2.2
> > > Does anyone know if there is a way to use the "toggle button" option for bootstrap on boolean fields in a simple_form? I would like to replace the checkboxes with buttons.
> > > Here is what I've tried so far with no luck in the form (rails):