Hello there,
I would like to know if it is possible to set a value for a Multi Line Textbox with rich text enabled in a Classic Form via JavaScript? I would like to be able to update the value of the field with html content depending on another field.
I tried already many different things but nothing worked so far and I am able to set the value for text fields and normal multi line text fields.
I tried things like this but without any luck:
var txtArea = NWF$('#'+ remun).closest('tr').find('div[id$="_inplacerte"]');
txtArea.html("testing 123");
Solved! Go to Solution.
I use this function to set mine. I add a form variable with a reference to this function. Use a unique class on the rich text field and pass that along with the text you'd like to the function.
function setMyRichTextField(FieldClass, RichText) {
"use strict";
NWF$("." + FieldClass).innerhtml(RichText);
}
Hey Jeremiah thanks for your reply.
Here is what I did to reproduce your solution:
When I run it I get the error "Uncaught TypeError: NWF$(...).innerhtml is not a function" and if you search for that error they tell you that you should use" .innerhtml = RichText. This doesn't produce an error but is also not working.
Do you use a normal Rich Text field or a Multi Line Textbox in your solution?
Thanks
Jan
I am struggling with this. did you find any solution?
Hey Shahad yes we figured it out!
The accepted solution didn't work for me in Nintex 2016 4.2.1, but I was able to get it working with the code below.
var ntxCtrl = NWF$('#' + ClientIDJavacriptVariable); NWF$('#' + ntxCtrl.attr("id") + "_inplacerte").html("Test Content Here");
@kyle_wright wrote:
The accepted solution didn't work for me in Nintex 2016 4.2.1, but I was able to get it working with the code below.
var ntxCtrl = NWF$('#' + ClientIDJavacriptVariable); NWF$('#' + ntxCtrl.attr("id") + "_inplacerte").html("Test Content Here");
I can confirm this works.