element.style.display='none' seems not working in UI Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 02:37 AM
Hi everyone,
I tried to hide a standard search icon by element.style.display = 'none' in UI Macro but it is not working.
Is it impossible to hide a standard icon or am using a wrong method?
Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 03:29 AM
Hi @Yu_G , is this for a normal field on your form? If so, you can use the mentioned attribute to hide the search icon and there is no need to amend the UI macro.
Here is an article that can help you :
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714705
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:39 PM
Thank you for your help.
I noticed that this article is about reference icon ⓘ , will it also works for search icon (maginified glass)of a reference field?
In addittion, somehow i managed to delete the search icon by using parentNode.removeChild. But am confused why element.style.display = 'none' is not working in this case.