Yes/No field bug

rss

Posted by stieland - Sep 16 ’13 at 02:50

I am noticing the following bug.  I have removed\added multiple statements and it always seems to happen.

 

If I have a Yes/No (Boolean) field.  If the value is true or (1).  (checkbox is checked)

Now if you set the control to read only (disable the control)

fd.field('Boolean').control().readonly(true);

Click save and the value of the field becomes No (checkbox is not checked)

  • Dmitry
    Dmitry
    Admin
    Member for: 7 years 5 months 28 days
    #1 by Dmitry Sep 17 ’13 at 01:17

    Hello,

    Internet Explorer doesn’t post data of the disabled fields and therefore SharePoint fills it in with the default value 'No'. The first workaround here is to make the field read-only via its property instead of using JS-framework:

    Make sharepoint field readonly

    But if you need to set this property dynamically, you can use JS-framework but you have to enable this field before the submission:

    fd.onsubmit(function() {
      fd.field('Status').control().readonly(false);
      return true;
    });
    
Displaying 1 to 1 of 1 messages