Update Sharepoint Field

Hi All,

I am a very newbie on Plumsail forms, I created a list on sharepoint with several columns. Then I open Plumsail to create a new form for testing.

I added a sharepoint field on the form, then want to use JS to update the value but it doesn't work.
This is the code:

fd.rendered(function(){
function test(){
fd.field('Company').disabled = true;
fd.field('Company').value = "test111";
fd.field('txt_status').value = "test";
}

test();

});

txt_status is a common field, its work to update value. but Company is a sharepoint field, it doesn't work to update value, however, it was disabled......

It is a very low level question but please help. Thanks~~

Dan

Hello @DanChan,

Welcome to Plumsail Community!

For SharePoint forms, you need to run the code under spRendered event, so your code should look like this:

fd.spRendered(function(){
function test(){
fd.field('Company').disabled = true;
fd.field('Company').value = "test111";
fd.field('txt_status').value = "test";
}

test();
});

Please find more information about events here.