- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 11:47 AM
Hello,
I am trying to find the best way to hide seconds from a duration field that we have. I am using something from another community post I found earlier. I was advised by a member on my team to modify the attributes on the field. How can I do that through an attribute?
This is what I have to currently hide the seconds and it works, but there is a temporarily glimpse at the seconds field while the page is loading:
function onLoad() {
g_form.getElement('ni.pm_project.effortdur_sec').style.display='none';
}
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:02 PM
Absolutely highly NOT recommended, for instance refer to the following official article:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0692555
If I have answered your question, please mark my response as correct and helpful.
Thank you very much
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:16 PM
Here is the article that is linked to using DOM manipulation.
They set additional styling elements so the field looks a bit more in line with the rest. Note they hide minutes as well, so you have to adjust their script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:19 PM
I tried Olegs way as well and it looked the same as the solution I am currently using