function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
suneel kumar 32suneel kumar 32 

Show and hide fields in standard layout

Hi friends,
      I have one requirement that I need to use standard layout of contact.In that I have a checkbox "same Mailing Address".When ever I check that ,all fields related to mailing address should not appear.
Do salesforce support hide/show of fields based on conditions?
Navee RahulNavee Rahul
Hello Suneel,

what you can do add Field Dependency to the Check box.Click on the Filed Name.
in the new screen where you can Add New Dependency fields.
User-added image

see the attached image.

D Naveen Rahul.
No, this (hiding and unhiding) is not possible with the standard layout, you will have to create a VF page.
But you can save the value using a trigger / process builder in the back-end.
Vasani ParthVasani Parth
I believe currently this is not possible in page layout. Salesforce trying to possible this feature via lightning App builder.
Here is the Idea you can vote for this.

Answer from success community
Salesforce doesnt support this. You can create field dependencies but all fields always show up on the page at all times for users as long as the field is included on the page layout and the field level security gives them access to it.

Source :