How do we put a placeholder in any of the other string fields?

ChuanYanF
Tera Guru

Dear expert,

 

I would like to know is there any way for us to include a placeholder feature in any of the string fields in the risk event record form, like currently the work notes and the additional comments feature which has a placeholder like below

ChuanYanF_0-1744165053361.png

 

1 ACCEPTED SOLUTION

Shivalika
Mega Sage

Hello @ChuanYanF 

 

You can just write 'ON LOAD CLIENT SCript" on that form as below 👇 

 

function onLoad() {

    var field = g_form.getControl('your_string_field_name');

    if (field) {

        field.placeholder = 'Enter your placeholder text here...';

   

}

}

 

It will work. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

View solution in original post

1 REPLY 1

Shivalika
Mega Sage

Hello @ChuanYanF 

 

You can just write 'ON LOAD CLIENT SCript" on that form as below 👇 

 

function onLoad() {

    var field = g_form.getControl('your_string_field_name');

    if (field) {

        field.placeholder = 'Enter your placeholder text here...';

   

}

}

 

It will work. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY