The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to add the HTML5 placeholder attribute to a Service Catalog Item variable

lasse3
Giga Guru

When exposing a request item in a service catalog on the service portal (Helsinki) it would be nice to be able to specify a placeholder tag on the HTML input field.

You can add hints and help text to the Service Portal using the "Instructions" field on the variable. However this only places the text above the input field and not as a placeholder.

Simplyfied what I would like to achive is to have Service Portal do this:

<input type="text" id="name" placeholder="Enter your name here" />

instead of this:

<p>Enter your name here</p> <input type="text" id="name" />

I know that this can be accomplished in the backend as discussed in this thread:

https://community.servicenow.com/thread/152916

This does however not seem to be compatible with the service portal and uses the g_form.getControl() which is deprecated for the mobile platform. Also it calls prototype using the $ object reference which is not supported in mobile scripts according to the wiki:

http://wiki.servicenow.com/index.php?title=Mobile_Client_GlideForm_(g_form)_Scripting

I figured that perhaps I could edit the sp-model in the angularjs part, but this seems to be hidden in the service-now core and is not accessible.  

Any input would be greatly appreciated.

1 ACCEPTED SOLUTION

shouvik
ServiceNow Employee
ServiceNow Employee

This is a feature coming in J release. Users will have configuration option to provide placeholder text(example text) for variables and will be supported both in platform and service portal.



Thanks


Shouvik


View solution in original post

6 REPLIES 6

shouvik
ServiceNow Employee
ServiceNow Employee

This is a feature coming in J release. Users will have configuration option to provide placeholder text(example text) for variables and will be supported both in platform and service portal.



Thanks


Shouvik


Hi shouvik,



I've been looking for where you do this on a field in the platform, like the add. comments have.. But can't seem to find it..


or is it only for variables, not "normal" fields?



//Göran


Hi Goran,



The feature that Shouvik mentioned, is only for "Variables" & not for platform "fields".



Thanks,
Deepak.


Teena Singh
ServiceNow Employee
ServiceNow Employee

Lasse,


Glad to see that you are using the Community to learn more.


The Customer Experience team is striving to ensure that customer queries posted from the HI Service Portal are answered in timely and accurate fashion.


If you feel your question has been resolved, please mark the appropriate reply in the thread as being the Correct Answer.


This enables other customers to learn from your thread.


Thank you in advance.



If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.



Regards,


Teena Singh
Customer Experience: UX Strategy and Customer Insights
teena.singh@servicenow.com


ServiceNow


Screen Shot 2017-01-19 at 8.55.52 AM.png