We can hide / show the fields on form dynamically without any coding using the business rules.
Select the entity for which you have to implement the business rule. In our case we are using Account entity. Within the selected entity navigate to the section “Business Rule” and open it and click on New.
Now the business rule template should get opened. Here select the dedicated condition for which you have to make a field hidden or visible. In our case we will hide the field “Fax” when Account Number is blank or empty. So in the condition we will set the Account Number to empty or does not contains data.
Now, in the component section select the component called Set Visibility and drag drop this component to the IF statement of the condition. In the properties on this component select the field “Fax” to be visible to Yes as shown in the below image.
Now validate, save and activate the business rule. Navigate to Account entity, enter any valid value in field Account Number. Now you will see that the field “Fax” will be in-visible or hidden. Now again navigate to field Account Number and make it blank or empty, here you will observe that the field “Fax” will be visible or shown.
For more information click on the link.