How to populate an HTML field based on the info selected on other fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 03:21 AM - edited 11-27-2022 03:59 AM
I have this requirement where I have to prepopulate an HTML field based from other fields.
As shown in the image:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 04:07 AM
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