Just tried the code I posted above with IE 9, and it did change the checkbox to a button. Did you give it a shot?
On Tuesday, January 29, 2013 2:00:45 PM UTC-5, Jim S wrote: > > The research I've done is telling me that IE won't allow you to change the > type of an element. Therefore, I need to generate it as a type="button" > from the start. The bootstrap example also shows this as a <button> > element and not an <input>. Not sure if that is relevant though. > > -Jim > > On Tuesday, January 29, 2013 12:53:50 PM UTC-6, Lamps902 wrote: >> >> Hi, Jim. What about doing the following: >> >> form.elements('input',_id='checkbox_field_n')[0]['_type'] = 'button' >>> >> >> I imagine the value can then be toggled with, for example, javascript's >> 'onclick' functionality, and stored in the db as usual. >> >> On Tuesday, January 29, 2013 11:46:55 AM UTC-5, Jim S wrote: >>> >>> I have a form that is going to hold a number of boolean fields. I want >>> to change them to buttons instead of checkboxes so I can use the bootstrap >>> button widgets. How can I chance the boolean widget from a checkbox to a >>> button and have the value properly put back into the database? >> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.