Disabling Number Sharepoint Fields

Could the update installed today changed the ability to disable certain fields?
I have been working on a form and yesterday I had some code disabling a number field (shown as percentage) and another that is a currency field. Today neither are disabling. I cleared cache, double checked my code and still does not seem to be working. I have a string field that is disabled.

Hello @cwalter2,

Thank you for reporting the issue! We are looking into it right now.

For now, you can disable Number and Currency fields using this code:

fd.field('FieldName').widget.enable(false);

Thank you. Will this functionality go away once the bug is fixed? My form is still in development so I would prefer not to change code if I do not need to.

Hello @cwalter2,

Most probably yes. I will let you know once there will be any news from our developers team.

Hello @cwalter2,

We've published a fix. Please completely clear the browser cache and test that you can disable Number and Currency fields using this code:

fd.field('FieldName').disabled = true;

Again, thank you for reporting the issue! :slight_smile:

Working now thank you!

1 Like

This issue has popped back up for me since updating my App Package yesterday.

@cwalter2,

I couldn't reproduce the issue on my tenant.

Are you getting any errors in the browser console(F12) when disabling the number field?

image

All other scripts on the page are working properly.

Also to be clear, I am unable to disable Sharepoint Number fields. I can disable Common Number fields. As a work around for the time being I am hiding the Sharepoint fields and setting the Common Field with the sharepoint field value. A cumbersome fix but a fix nonetheless. Please let me know what you find.

@cwalter2,

I couldn't reproduce the issue on my form.

Is that a Number or Currency field? Could you please share the screenshot of the field settings.

When do you disable the field? On form load or when the other field is changed?
Could you please share the code.

On the form in which I noticed the issue one was a currency field, the other was a number field formatted as a percentage. I have another form that has a number field that I am having issues with as well. Just dealing with the form I originally submitted the question on. Here are the screen settings:



To simplify troubleshooting I commented all of my code except the following:
fd.spRendered(function() { $('.hideMe').hide(); $(fd.control('RateTable').$el).find('.btn').hide() fd.field('Project_x0020_Number').disabled=true; fd.field('Job_x0020_WC_x0020_Rate').disabled=true; fd.field('Job_x0020_Burden_x0020_Rate').disabled=true; fd.field('ComSTTot').disabled=true; fd.field('ComOTTot').disabled=true; fd.field('ComDTTot').disabled=true; });

Is there any update on this issue?

Hello @cwalter2,

I'm sorry, I couldn't reproduce the issue on my side.

Could you please give us temporary access to the form to troubleshoot the issue. Please send us a link at support@plumsail.com

@mnikitina while I was preparing the link I discovered a disconnect. It appears as though the disabling does not work when the form is opened in dialog. When I opened a direct link, the fields were disabled as anticipated. I am able to disable common number fields in dialog. I hope this helps.

UPDATE: I just went into the form in dialog as I was going to send instructions over email and it is now disabled in dialog as well.

I'm having this same issue with a currency sharepoint field type on a SharePoint form. I did a full cache clear in browser, and neither the workaround code in this thread or the standard .disabled=true is working for me.

fd.rendered(function() {
    fd.field('RequestAmount').disabled = true;
});

What else should I try? Running only in dialog isn't really an option. Is there a way to just set the width to 1px and remove the up/down roller arrows?

Hello @Gabegia,

What version of the app package are you using? You can find it in the browser console (F12) Sources >> Page >> forms.plumsal.com

image

What version of the designer are you using?
image

If you are using an outdated version of the widget or designer, please install the latest versions.

Learn how to update the widget here.

While I'm on V1.7.9 of the designer, I'm on v1.0.6 and 1.0.7 of the web part - I completely forgot that it had a SharePoint app installed as well. I'll install the updates - I'm sure that will fix it. Thanks for the guidance!
image

1 Like

Hi @mnikitina - I was able to update our forms and widget to 1.0.8.0V1.0.8

fd.rendered(function() {
//Disable request total and status field
fd.field('Status').disabled = true;
fd.field('RequestAmount').disabled = true;

});

I've cleared all browser cache/cookies and rebooted as well, just to be sure the old versions were not saved. I should be able to just put it in either a spRendered (since it's a SharePoint form) or a Rendered method, correct?

I love the V1.0.8 table display updates, by the way. It looks really sharp in Sharepoint!