Set a value with Javascript in a Form didn't work

Hello guys,

I tried to set a value manually with JavaScript, but I always get an error message. This is my function:

fd.spRendered(function() {

fd.field('TSName').value = "TSName";


and I get the following error message:

Uncaught TypeError: fd.spRendered is not a function
at HTMLDocument. (fd_Item_New.aspx?List=5740b9b5-e8de-40a5-83b9-93ec62b71baf&{(0)%3A0}%26_c16%3D{(0)%3A0}%26_c18%3D{(0)%3A0}%26_c20%3D{(0)%3A0}%26_c22%3D{(0)%3A0}%26SourceUrlKeys%3DStartIndex&RootFolder=&Web=429d108c-7055-45ae-9d88-06e6aa69a14e:967)
at j (plumsail.fd.jquery.js?rev=uWqMkVfr%2B6VHuu0VYpVNCg%3D%3DTAG0:2)
at Object.fireWith [as resolveWith] (plumsail.fd.jquery.js?rev=uWqMkVfr%2B6VHuu0VYpVNCg%3D%3DTAG0:2)
at Function.ready (plumsail.fd.jquery.js?rev=uWqMkVfr%2B6VHuu0VYpVNCg%3D%3DTAG0:2)
at HTMLDocument.J (plumsail.fd.jquery.js?rev=uWqMkVfr%2B6VHuu0VYpVNCg%3D%3DTAG0:2)

Best regards


Hello @Matthias0710,

Welcome to Plumsail Community!

What product are you using? Public Forms or SharePoint forms?

Could you please share the screenshot of the form with the console errors.

Also is it a complete code you are using on the form? Could you please share the screenshot of the code in the designer and where you've used it.


it's just a testing for the SharePoint forms. The screenshot is in the answer.

Thanks for your help!!


Best regards


Hello @Matthias0710,

Thank you for the screenshot!

You are using Forms Designer for Classic UI, and spRendered() works in Plumsail Forms for Modern UI only.

Using Forms Designer, to disable and populate field on form load, please use this code:


Note, that you need to enable field before the submission:

fd.onsubmit(function () {
  return true;

Also, I would suggest you to test out Plumsail Forms for Modern UI, as it has more controls, reacher API and is coastally improved. You can request the trial here: