Showing posts with label Hide. Show all posts
Showing posts with label Hide. Show all posts

Tuesday, January 10, 2012

Tip - Hide fields on CRM form without messing up the form layout

Generally if you hide a field through script, CRM does not redesign the layout to use up the blank space left from the hiding of a field on the form. This makes it very obvious that there must have been some control that is now not visible to the user. To avoid this you can make use of the CRM 2011 ability to add the same field multiple times on a form.

Say for example you would like to hide the Estimate Revenue field from the form and make it available conditionally.



Simple script to hide the field would display the form as shown below.





To make sure that such empty spaces are not visible on the form, you can instead create 2 sections on the form, one with the Est. Revenue field and the other without the field.





Through script you can then show/hide the entire section. This way the form layout is not affected.