How to show Placeholder in Fields whenever it is empty?

Meloper
Kilo Sage

Show Placeholder in Fields, whenever it is empty.

For new Records during the manual submit, for on load and of course after every save and update if the Form of the records appears again.

3 REPLIES 3

Anurag Tripathi
Mega Patron
Mega Patron

Not variables, i maen fields 

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Meloper 

function onLoad() {
//Type appropriate comment here, and begin script below
var short_desc = g_form.getControl('short_description');
var desc = g_form.getControl('description');
short_desc.placeholder = 'Please provide short details about this change.';
desc.placeholder = 'Please provide details in brief, what exactly this change is about.';
}

 

https://www.servicenow.com/community/developer-blog/how-to-set-placeholder-for-change-request-using-...