-
Notifications
You must be signed in to change notification settings - Fork 40
Description
I am facing this problem when using SPUtility.js inside my SP 2013 on-premises, now i want to do the following inside my sharepoint 2013 list forms:-
- Set a Choice field as ReadOnly.
- then chnage the value of the ReadOnly Choice field using SPUtility or pure JavaScript.
now to make my Choice field ReadOnly i use the following SPUtility method:-
SPUtility.GetSPFieldByInternalName('OrderStatus').MakeReadOnly();
but when i tired to change the value of the list after making it ReadOnly, as follow:-
SPUtility.GetSPFieldByInternalName('OrderStatus').SetValue("In Progress");
OR using pure javascript appraoch as follow:-
$('[id^="OrderStatus"]').val("In Progress");
i was unable to change the status value? so can anyone adivce how i can handle this problem? so i can change the value of a ReadOnly list?
second point, is there a way i can temporary remove the MakeReadOnly() effect on the field? if this is possible , then i can remove the ReadOnly effect on the Choice field, then set its value, then make it as ReadOnly again ?
Thanks