Initially hidden form field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2012 03:01 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2012 10:39 AM
I'm not even sure that it's technically possible to avoid completely in a browser app...which is why I created the solution I did. You can open an enhancement request with ServiceNow support if you want though.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2012 11:18 AM
Yes it is possible. The OP mentioned it: style="display:none;" - or a CSS class that sets that style.
I'm currently evaluating SN so I don't have a support account, or else I would request an enhancement. This would be a very easy thing to do.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2012 01:47 PM
Hello Mark, John,
First of all thanks again to Mark for his suggested solution. It took 10 min to implement in one of our forms. Now I just have to decide which forms / views to include the formatter(s).
Second, to John: your comment somehow made my brain connect a few ideas I've been having lately and I found a way of achieving this... although just a start. I will post details if I finish it.
Just a hint: it involves using formatters, and either CSS and a couple of really mean hacks, or Javascript (although this I would prefer to avoid).
Cheers,
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2012 01:57 PM
David,
Great to hear! I'll have to look into formatters...
I'm a total newbie on the ServiceNow platform, but have a long history of web development with skills in JavaScript, jQuery, CSS, HTML, ASP.NET, C#, etc.
I'm definitely looking forward to mastering the SN platform and collaborating with the community.
John