How do I apply a form template to a form on load?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 11:56 PM
Hi all,
I have a saved template called Story Template.
I want that template to be applied every time the story form loads. How do I script it?
I tried UI Policy script.
Description is empty AND
Acceptance Criteria is empty
g_form.applyTemplate('Story Template');
//Also tried the below methods.
// g_form.setActiveTemplate('Story Template');
// g_form.setTemplate('Story Template')
The last two were suggested by ChatGPT 😄
Regards,
Anish
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 04:17 AM
Hi ,
Please add the below code in the on-load client script on the form where it needs to be fixed.
function onLoad() {
//Type appropriate comment here, and begin script below
applyTemplate('fcf40e6183339210db6f9470ceaad3cd');
}
Note: Please mark my answer as helpful if it solves the problem.
Thanks and Regards,
Vasudev S V
Note: Please mark my answer as helpful if it solves the problem.
Thanks and Regards,
Vasudev S V