View Full Version : Traditional Checkbox in login form

24 Aug 2011, 4:03 PM
I'm designing a login form in Sencha Touch which would have a "remember me" checkbox. The "wide checkbox" kind of sucks for this application, I think a more traditional checkbox with right aligned text would work better. Is there a way to adopt this style without losing the nice features FormPanel/Model/Record give you?

24 Aug 2011, 10:19 PM
app.SimpleCheckbox = Ext.extend(Ext.form.Checkbox, {
baseCls: 'x-plain',
renderTpl: [
'<tpl if="fieldEl"><input id="{inputId}" type="{inputType}" name="{name}" class="{fieldCls}" tabIndex="-1" ',
'<tpl if="checked"> checked </tpl>',
' value="{inputValue}">&nbsp;{label}</input>',
Ext.reg('simplecheckbox', app.SimpleCheckbox);

14 Mar 2012, 3:56 PM
Thanks for posting your solution :)