public/js/data.js
function( element, obj ) {
    var accessor = this._getAccessor( obj );
    var value = accessor.get( element.name || '');
    value = this._format( element.name, value, element );
    if( element.type == "radio" || element.type == "checkbox" )  {
      element.checked = this._isSelected( element.value, value );
    } else if ( element.type == "select-one" || element.type == "select-multiple" ) {
      for( var j = 0; j < element.options.length; j++ ) {
        element.options[j].selected = this._isSelected( element.options[j].value, value );
      }
    } else {
      element.value = value || "";
      // reset defaultValue if we only want to serialize changed fields
      if (this.changedOnly) {
        element.defaultValue = value;
      }
    }
  }
function( element, obj ) {
    var accessor = this._getAccessor( obj );
    var value = accessor.get( element.name || '');
    value = this._format( element.name, value, element );
    if( element.type == "radio" || element.type == "checkbox" )  {
      element.checked = this._isSelected( element.value, value );
    } else if ( element.type == "select-one" || element.type == "select-multiple" ) {
      for( var j = 0; j < element.options.length; j++ ) {
        element.options[j].selected = this._isSelected( element.options[j].value, value );
      }
    } else {
      element.value = value || "";
      // reset defaultValue if we only want to serialize changed fields
      if (this.changedOnly) {
        element.defaultValue = value;
      }
    }
  }
function ( element , obj ) { var accessor = this . _getAccessor ( obj ) ; var value = accessor . get ( element . name || '' ) ; value = this . _format ( element . name , value , element ) ; if ( element . type == "radio" || element . type == "checkbox" ) { element . checked = this . _isSelected ( element . value , value ) ; } else if ( element . type == "select-one" || element . type == "select-multiple" ) { for ( var j = 0 ; j < element . options . length ; j ++ ) { element . options [ j ] . selected = this . _isSelected ( element . options [ j ] . value , value ) ; } } else { element . value = value || "" ; // reset defaultValue if we only want to serialize changed fields if ( this . changedOnly ) { element . defaultValue = value ; } } }
update the form field with the property value
update the form field with the property value