Backbone form - custom template for a field - not submitting the value

108 views
Skip to first unread message

Deep

unread,
Dec 8, 2014, 8:48:32 PM12/8/14
to backbon...@googlegroups.com
SO i have a checkbox in my template which is (jade)

input(type='checkbox' name='flag' class='pure-checkbox onoffswitch-checkbox' id='myonoffswitch')

and i use this custom template form my flag field


schema: flag: template: require ('templates/onoff-switch.hbs') threshold: type: 'Text' title: 'Threshold($)' editorClass: 'pure-input-1-3'


but when i submit my form the flag value is not set, its empty. I hope i have to bind my value to the checkbox value but i am sure how.

i tried

input(type='checkbox' name='flag' class='pure-checkbox onoffswitch-checkbox' id='myonoffswitch' checked="{{#if flag}}checked{{/if}}")


Any idea?

Reply all
Reply to author
Forward
0 new messages