Insert a SharePoint field into an HTML control


I'm attempting to insert a field into the HTML control so that it will display on the form. I've reviewed the HTML control information in the Plumsail website but it does not seem to work for me:

When I try this, the data does not display: Here is an example of the code I've used:

What am I missing? Your assistance would be very much appreciated. Thanks!

Hello @erob123,

You can set HTML control value and insert SharePoint field value using the code:

//you can also insert field values with JavaScript
fd.control('Control1').html = '<h1>Title: [Title]</h1>'

Make sure you use the internal field name.

I did see that but how would I right that code. The HTML control does not have a way to name it. It only let's me add a Class. How would I write it that way without being able to add the control name?


Ok, I see.

If you are using SharePoint Online, please use the new designer. You can download it from your Plumsail Account:

In the new designer you can edit the content of the HTML control and insert field values using the code:

fd.control('Control1').html = '<h1>Title: [Title]</h1>'

If you are using SharePoint On-premises or don't want to move to the new designer, please use Rich Text control instead of the HTML control and this code:

fd.control('Control1').text = '<p> New text [Title] </p>'