i have some textfields on a form with the dirtyclass set, and I have 2 problems.
PROBLEM 1)
Code:
me.uRef2 = Ext.create('Ext.form.field.Text', {
fieldLabel :'user ref 2',
labelAlign: 'top',
name: 'userRef2',
dirtyCls: 'dirty-textfield'
});
in the css
.#dirty-textfield {
background-color: #00AA00
}
the problem is it applys the colour to the label, not the field. We get a bright green label and the field is left white.
Code:
<table id="textfield-1695" class="x-field x-form-item x-field-default x-table-form-item dirty-textfield" cellpadding="0" style="table-layout: fixed; ">
<tbody>
<tr>
<td id="textfield-1695-labelCell" colspan="3" style="" class="x-field-label-cell">
<label id="textfield-1695-labelEl" for="textfield-1695-inputEl" class="x-form-item-label u4-form-field-lable x-form-item-label-top" style="margin-bottom:2px;">User reference 2:</label>
</td>
</tr>
<tr id="textfield-1695-inputRow">
<td class="x-form-item-body " id="textfield-1695-bodyEl" role="presentation" colspan="3" style="width: 150px; "><input id="textfield-1695-inputEl" type="text" size="1" name="userRef2" placeholder="No matching values found." style="width: 100%; -webkit-user-select: text; " class="x-form-field x-form-text u4-form-field-input" autocomplete="off" aria-invalid="false" data-errorqtip="">
</td>
</tr>
</tbody>
</table>
PROBLEM 2)
when we load the form any fields that have data in them are now marked as dirty. I expected Dirty to only be kicked off by the user actually typing data into the form.
Code:
me.loadRecord(editLine);