
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:14 AM
Hi All,
Can anyone help me out how to hide fields on form using java script.
If the user selects None or In progress choices from the Internal Interview drop down, then hide Feedback and Interviewer fields which are highlighted in the red color.
i have tried with below code but its not working for me
g_form.setDisplay('Interviewer', false);
g_form.setDisplay('Feedback', false);
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:19 AM
Hi Anil,
You need to write a UI policy on the Table with condition as Initial Interview is None OR Initial Interview is In Progress and Add 2 new UI policy actions for the fields Feedback and Interviewer. On the UI policy action for 2 fields, set Visible to false to accomplish your requirement.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:19 AM
Hi Anil,
You need to write a UI policy on the Table with condition as Initial Interview is None OR Initial Interview is In Progress and Add 2 new UI policy actions for the fields Feedback and Interviewer. On the UI policy action for 2 fields, set Visible to false to accomplish your requirement.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:19 AM
When a field is mandatory (as indicated by the red asterisk), it cannot be hidden. Ideally, you'd do this with a UI policy rather than a client script. Then you can set the mandatory and visible states to be consistent. If you need to do as a client script try calling g_form.setMandatory('Interviewer', false). Of course, this assumes that mandatory is not defined by either a data policy or in the dictionary, in which case it cannot be controlled on the client side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:21 AM
Hi Anil,
You better write a UI Policy as per best practice.
Create a new UI Policy on the table and give the filter conditions as Internal Interview is one of None, In Progress. And use the UI Policy Actions to set Feedback and Interviewer fields 'Visible' false.
Also make sure the fields are non-mandatory. Cause you can not hide mandatory fields. If the fields are mandatory, you must set 'Mandatory' false too along with setting the visibility of the fields in the UI Policy actions.
I hope this helps.Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2017 05:26 AM
thank you all,
I am able to do using UI policy Actions, but i want to do using client script.