- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 02:59 AM
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.";
}
However, we are now using service portal and the form widget to create records etc and this does not come over
Can this be done?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:12 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:04 AM
Hello,
Jakarta release has OOB support for placeholder text. Please refer "Example text" field in the dictionary of the field and add your placeholder text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:10 AM
Is this field available on navie form. I dont see example text available at all. We are in Jakarta also.
We are not using a record producer, we have built form in back end and calling it in service now form widget using sys_id=-1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:04 AM
Hi,
Check if the UI type of your client script is selected to Both/All
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:09 AM
It has been set to all.
Im guessing its a portal issue. It works fine in backend but not on form widget