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

Anish Reghu
Kilo Sage
Kilo Sage

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

Vasu20
Tera Contributor

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