
- 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-13-2017 11:06 PM
Hi Anil
Try this
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var a=g_form.getValue('internal_interview');//give ur field value here
if(a==1){
g_form.setVisible('feedback',true);//give ur field value here
g_form.setVisible('interviewer',true);//give ur field value here
alert('some felds hide');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 12:18 AM
Hi Anil, code looks good but are your field names correct? Can you right click on the field and click "Show" Fieldname..Are they really feedback and interviewer?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 01:44 AM
Hi Regina,
yeah both fields names are correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 01:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 01:59 AM
then in the case, take note what the new value is displaying then use it in your condition.
try this:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
alert('newValue' + newValue);
if(newValue==1){
g_form.setVisible('feedback',false);
g_form.setVisible('interviewer',false);
}
//Type appropriate comment here, and begin script below
}