Place holder text

brendanwilson84
Kilo Guru

Hi Guys

We have a client script for place holder text which works fine on back end form, naive UI.

function onLoad() {

    //Type appropriate comment here, and begin script below

  var eta= g_form.getControl('u_eventname');

eta.placeholder = "test.";

}

find_real_file.png

However, we are now using service portal and the form widget to create records etc and this does not come over

find_real_file.png

Can this be done?

1 ACCEPTED SOLUTION

I guess the g_form.getControl() method is not supported by Service Portal



You can check this link which shows the client side API's which can be used in Service Portal.


It does not contain that method



Service Portal and client scripts


View solution in original post

16 REPLIES 16

Maria DeLaCruz
Tera Guru

Our organization is on the Kingston version, and the method g_form.setFieldPlaceholder('field_name', 'Example text') works on native forms in the Service Portal.

ronhrhr
Tera Contributor

one question, if i want to create this ghost/placeholder text for 8 fields in incident form, so i need to create 8 client script?/ or any other way?