I need to placeholder to be set for a field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:49 AM
Am using on change client script,
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
g_form.setFieldPlaceholder('u_network_diagram','Provide the link to the current CDE diagram that reflects the changes being requested');
but its not working
thanks
sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:52 AM - edited 12-16-2022 04:58 AM
Hi @siddharth26 ,
Before you use placeholder by client script ensure your field is present on the form. If yes then you could achieve this with an onLoad client script.
1.
var field1 = g_form.getControl('[INSERT NAME OF FIELD HERE]'); field1.placeholder = "Test Placeholder";
or
2.
Regards,
Reshma
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 05:02 AM
Hi Reshma,
I have tried this but still does not work for me.
thanks
sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 05:45 AM
Hi @siddharth26 ,
It's working for me:
Are you trying on filed/variable and which type of field it is?
If you are using to place it on variable use can use Example Text
Also check if you have any other UI Policy/Client Script running which is clearing this field value.
Regards,
Reshma
**Please mark my answer correct or helpful based on the impact**