Initially hidden form field

dmartinc
Tera Expert

Hello all (specially SNow devs),

Is there a way to have form field "really" initially hidden?
We have added many custom fields to our incident form. Most of the time, they are hidden (thanks to UI Policies).
However when the page loads, on slow computers / browsers (mainly IE) one can see these fields during a moment (sometimes a long moment) before the UI Policies kick in and hide the field. This is both confusing for the users and adds page load time.

So... is there a way to have a form field initially hidden? By "initially" I mean in the HTML that is sent from server to client, via a style="display:none;" or similar, before the client scripts / policies act.
If not, are there any plans of adding this feature later, maybe as a new dictionary field or attribute?

Note: if you remove a field from the form completely, you cannot show it later with a UI Policy.

Thanks in advance,
David

8 REPLIES 8

Mark Stanger
Giga Sage

There isn't a way to do what you're asking but there are some things you can do to prevent user interaction while the form loads and give an indication to the user of what's going on. Here's a SNCGuru article that should give you some ideas.

http://www.servicenowguru.com/scripting/client-scripts-scripting/solving-client-script-before-after-problem/


dmartinc
Tera Expert

Dear Mark,

Thanks for the link. The "form loading" dialog could be a partial solution to the problem. If the users have to wait, at least tell them that they are waiting (and this way, they cannot click around before the form ends loading).
Another idea we are thinking of implementing is putting most of those fields in a separate tab. Many of them are related to other 3rd party systems and only appear if the category is the appropriate one.

Many thanks,
David


That might help to obscure the fields a bit by placing them a bit lower on the form, but all tabs (and information within them) get rendered as a straight form section before they collapse into tabs and are hidden. I think you would end up with pretty much the same problem that way, but if you had the fields low enough on the form then it might not be as noticeable.


John Caruso
Kilo Guru

Where do I vote for the ability to set initial visibility of a field to hidden, so I can avoid the show/hide flash with slower browsers?

Even on a very simple form I see this with IE8 (corp std).