Placeholder text in record producer

josh_brostoff
Giga Contributor

I would like to set placeholder text in a record producer reference field.   Is it possible to do this?     I don't want it to be a default value, but just grey placeholder text.

6 REPLIES 6

Man, it would be cool, but that doesn't seem to work for reference fields. You can definitely do it via dom manipulation, which is frowned upon, but you could write a script like this in an onload client script on your record producer:

// get the field id for the reference display field
var dispID = "sys_display." + g_form.getControl('caller_id').id;

// replace the characters that won't work in jquery selectors for IDs:
dispID = dispID.replace(/\./g, "\\.").replace(/:/g, "\\:")

// use jquery to set the placeholder text
$j("#" + dispID).attr("placeholder", "Your Placeholder Text");

This should work in backend views, but for service portal, you will need a different approach entirely.

Sang4
Tera Contributor

It works on reference fields, if you have SNUtils and use the /uh command. If you don't have SNUtils you can add the Example Text in the list view.