Update HTML Control via Javascript

Hiya Plumsail

I was wondering is there any way to update a HTML control via javascript? I can't see a way to reference it, with plaintext control there is fd.control('Text1').text, but with the HTML control, there is no name field...

Please help!!!

Regards

Hello @Jamal_Smith-Graham,

You can update HTML control using jQuery. Give control a CSS class, e.g. html-control:
image
Then you can change the content of the control using this code:

$('.html-control').html("<b>Hello world!</b>")
1 Like

Ahh... you have done it again! :slight_smile:
Thank you so much @mnikitina

Maybe you can update this page with that info?

I am guessing we can do that same for the rich text control?

Hello @Jamal_Smith-Graham,

You are welcome!

You can change any element on the page with JQuery. That is not a specific API of Plumsail Forms, that is why it is not mentioned in our documentation.

1 Like