title: Get a field's _current_ value in Component Editor? (Tridion 2011 SP1)
body: <p>I'm writing an extension to the "Save" Command, where basically I want to validate certain fields and present a popup allowing the editor to select a given keyword or other values based on current date, a Release # and some other attributes.</p>
  
  <p>I thought I was doing good progress until I finally figured out that <code>$display.getItem()</code> is returning the item as is stored in CM, not the current values that the editor may have changed.</p>
  
  <p>Is there a built-in method to get me this information? Or do I need to parse the DOM to figure it out?</p>
  
  <p>This is the code I currently have</p>
  
  <pre class="lang-js prettyprint-override"><code>var item = $display.getItem();
  if (item.getItemType() == "tcm:16") {
     if (item.getSchema().getStaticTitle() == "Test Schema") {
        var content = $xml.getNewXmlDocument(item.getContent());
        var fieldXml = $xml.getInnerText(content, "//*[local-name()='NewField']");
        alert(fieldXml);
     }
  }
  </code></pre>
  
  <p>It is working - I get the value of "NewField" - but this is the value the item <em>had</em> when it was loaded, not the <em>current</em> value.</p>
  
  <p>Interestingly, <code>item.getTitle()</code> shows the current value of the Title field, so I hope there may be a way to achieve this for custom fields too.</p>