Changeset 1956


Ignore:
Timestamp:
2011-09-29 08:45:07 (8 months ago)
Author:
mpo
Message:

fix for reading initial value from checkboxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/control.js

    r1953 r1956  
    190190            var control = $this.attr(ControlElements.ATTR_CONTROL); 
    191191            var value =  $this.attr("value"); 
     192            if ($this.is('input[type=checkbox]')) { // special treatment for checkboxes: 
     193                // value is always 'on' while the real value is in the 'checked' property 
     194                value = $this.is(':checked'); 
     195            } 
    192196            var disabled =  $this.attr("disabled"); 
    193197            var childtype =  $this.attr("kauri-child"); 
Note: See TracChangeset for help on using the changeset viewer.