im trying to change color of some field depending on state , i ve succced to access the formview dom ,but i'm stuck with a problem even if i set conditon , the first this.$el.find('mydiv').addclass('class1') apply on all record
function (record) {
if(record.state==='draft')
self.$el.find('[name="hname"]').addClass('draft');
}
else if (record.state==='ready')
{ console.log(record.state)
self.$el.find('[name="hname"]').addClass('ready');
}
else if (record.state==='done')
{ console.log(record.state)
self.$el.find('[name="hname"]').addClass('done');
}
}
)