How to hide a field in widget??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 02:04 AM
Hello Team,
I want to hide the "Justification" field when the "Requested for" field is empty. But this is widget how to do this??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 05:28 AM
you are saying to set the <div id> for requested for or justification??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 05:31 AM
Yes and write below code in client side script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 05:37 AM
If both fields are mandatory, why do you want to hide one since the other is empty?
I invite you to check in to the ng-if parameter for AngularJS which makes the HTML conditional. While I haven't done something exactly like this you could try something like:
<input name="justification" ng-if="c.data.requester!=''">
Note, this code is highly untested, but should give you the idea where to start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 05:51 AM
Based on my requirement I am returning a "true" or "false" value from my server side to client side in widget editor.
If the return value is "true" means,
I have to hide the "Purpose " field,
Else the return value is "false" means,
I have to hide the "Justification" field,
This return function will work only they select the "Requested for" field,
So Initially I want to hide the both "Purpose " and "Justification" field