Is it possible to hide fields, so that I have two views of the same form – let’s say, an administrator view (which shows all the fields, hidden or not) and a user view, which just shows the public fields?”
Create2 Views of the same Form as described below:
- Create the first view, named View1 with all fields (columns) being displayed and restrict the access to this view to just the Owner. This is done via the Share Tab in Edit Mode, by sharing the view to the required email-id. By default, the application owner (admin user) has access to all the Forms and Views in the application. So you just have to make sure that other users do not have access to this View.
- Create the second view, named View2 with only the required fields to be displayed to the user. Use the Column Properties link in the left panel to turn off display of fields (columns) and you give your other Users Share Access to this View. This is done via the Share Tab in Edit Mode, by sharing the view to the required user email-ids.
- If you want to restrict these other users tojust viewing the individual record, use the Set Permissions link in the left panel and make sure the Add, Edit and Delete capabilities are turned off.
- If you need to permit these other users to (say) Edit records but be restricted to just the fields they can view, then in the on Edit ->on Load section of your Form, add Deluge Script to check if zoho.loginuser is the same as zoho.adminuser. If they are different, you have to have a series of hide <fieldname> commands to hide them in the Edit Form as well. Refer the Show Hide fields for more information.
- You can do the same in the on Add ->on Load section of your form but you have to be careful that some key/required fields are not hidden from such users.