title: Update form record for disabled fields
body: <p>I have a complex form in ExtJS 4, where various parts of the form are dynamically enabled or disabled based on what the user selects from some of the form fields. <strong>Whenever I disable a form field, I also clear any value it currently has in it.</strong></p>
  
  <p>I have a model class representing the form. To load the form, I use <code>form.loadRecord(model)</code>. To update my model when the user "submits" the form, I use <code>model.set(form.getValues())</code>.</p>
  
  <p>The problem is that ext's <code>getValues()</code> implementation skips form fields that are disabled. This causes problems in my case, because some of form fields that have changed values are disabled (ie. form fields whose values I cleared when I disabled them). As a result, these fields are not updated (cleared) in the model when I call <code>model.set(...)</code>.</p>
  
  <p>What would be the best way to work around this problem? I've considered the following ideas, but none seems very good. If you have a better one, I'd like to hear it.</p>
  
  <ul>
  <li>Clear the model (set all fields to undefined) before calling <code>model.setValues()</code>. Unfortunately, there is no <code>model.clear()</code> method, so this gets ugly quickly - I have to get all fields and iterate over them, clearing each one individually.</li>
  <li>Clear model fields also when I disable and clear the form fields. This seems to violate separation of concerns and also means the model gets changed, even when the user chooses to cancel and not submit the form.</li>
  <li>Override ext's implementation of <code>form.getValues()</code> to not skip disabled fields. This is even more ugly because the actual code that needs to be changed is in the <code>Ext.form.field.Field</code> class, not <code>Ext.form.Basic</code>.</li>
  </ul>