setVisible works, but setDisplay doesn't

petercawdron
Kilo Guru

I'm looking to show/hide form content based on changes on a form (including show/hide of related lists) and would like to use setDisplay (because it reclaims white space on a form), but only setVisible seems to work (which leaves white space), setDisplay fails.

g_form.setVisible('short_description', false); //works

g_form.setDisplay('short_description', false); //doesn't work

Any ideas?

1 ACCEPTED SOLUTION

petercawdron
Kilo Guru

Thanks for all the suggestions.... I've gone with a global UI policy. I had hoped to be able to do this from within an application scope, but it simply wasn't possible.


View solution in original post

14 REPLIES 14

petercawdron
Kilo Guru

Thanks for all the suggestions.... I've gone with a global UI policy. I had hoped to be able to do this from within an application scope, but it simply wasn't possible.


Hi Peter,

Is it possible to do this for a scoped application?

Cheers,
Nabeel

In Kingson, g_form.setVisible works correctly (reclaiming the white space), so I think this is a bug that's been quietly resolved in the background


Abhinay Erra
Giga Sage

I deserve some credit too in resolving your problem


Tim Deniston
Mega Sage
Mega Sage

I found a hidden gem in the service catalog's implementation of g_form today. setContainerDisplay: Can be used to show/hide an entire section and it works inside application scopes. 

 

Example:

g_form.setContainerDisplay('user_info', false);

Since it is undocumented, it might go away at any time. Good luck!