How to populate an HTML field based on the info selected on other fields

MelvinBulan
Tera Contributor

I have this requirement where I have to prepopulate an HTML field based from other fields.

As shown in the image: 

MelvinBulan_1-1669547632022.png

The situation is that, if the "Create on-behalf of" field is blank. The details(which is the name) will be put in the contents of the HTML field (the manager's name) based from the "Requester" Field. If the "Create on-behalf of" field is not blank. The name that will be put will be coming from the "Create on-behalf of" field. Both are reference fields.

 

My HTML Field variable

 

MelvinBulan_2-1669547811338.png

 



 

1 REPLY 1

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,

Create a client script and set the value of the field as HTML.

Sample Script like below-

var htmlBody="<p>Name: "+g_form.getValue('requester')+"</p>";
g_form.setValue("detail_variable",htmlBody);

 

 


Thanks and Regards,

Saurabh Gupta