I'm trying to set default text on Enhanced Rich Text field in Default New Form. I tried code from here and here and some other places, but nothing works for me.
My target field doesn't have a title, so I try to select it by it's ID.
var DesciptionID = "ctl00_m_g_80cbe371_4e9b_405f_afdd_b251a2b45ec2_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_inplacerte";
var ImpactBoxID = "ctl00_m_g_80cbe371_4e9b_405f_afdd_b251a2b45ec2_ctl00_ctl05_ctl03_ctl00_ctl00_ctl04_ctl00_ctl01";
$(document).ready($(function() {
$("#"+ImpactBoxID).change(function() {
if(this.checked) {
alert("checked");
$("#"+DesciptionID).val("paragraph"); // <<<<
$(":input[title=Title]").val("here is title"); //this one works. single line field. it also has a title
}
});
I was able to achieve my goal on plain text, but i need enhanced one.
Also here is whole cell in case I'm getting the wrong ID.