The visibility selection drop-down list can be added to any field of the user's profile, not only the e-mail field as show in the example in chapter How it works. This can be changed in Site Manager -> Development -> System tables. Choose to Edit () the User (CMS_User) system table and switch to the Alternative forms tab.
If you are not familiar with the Alternative forms concept, please read the Module Alternative forms chapter first.
The CMS_User system table is the database table where information about registered users is stored. Each of the four alternative forms that you see in the list is used in a specific situation when the system accesses the table:
• | Registration form - when registering a new user using the Custom registration form web part |
• | Display profile - displaying user's public profile using User public profile web part |
• | Edit profile - when editing user's profile using the My account web part |
• | Edit profile (MyDesk) - when editing user profile in CMS Desk -> My Desk -> My profile |
The Community_Group system table is the database table where information about groups is stored. The table has the following alternative form:
• | Display profile - displaying group's public profile using Group public profile web part |
Field visibility can be set in each of these forms.
Let's presume that we want the Full name to be optionally hidden in users' public profiles, based on the users' decisions made in their profile editing section.
1. Choose to Edit () the Edit profile (Community) alternative form, which is the form that is used by the My profile web part on the Community site. Switch to the Fields tab and select FullName from the list on the left. Select Visibility (radi buttons - horizontal) from the Visibility control drop-down. Check the Allow user to change field visibility check-box and click OK.
2. Switch to the Layout tab. We will need to create another line in the table and add the visibility control into it.
Place the cursor into the FullName line (where the $$label:FullName$$ value is). Right-click and choose Row -> Insert Row After from the context menu. Into the first column of the new row, enter Display my full name to:.
Now we will add the visibility control itself. Place the cursor into the second column, select FullName from the Available fields list and click the Insert visibility control button. The result should look as in the screenshot below.
When you are finished, click Save.
3. Now sign out of the administration interface and sign in to the website as David with blank password. Click the Edit my profile link in the right Shortcuts menu. You should see a drop-down list next to the full name field, so that now the users can determine the visibility of the Full name field.
Page url: http://devnet.kentico.com/docs/devguide/index.html?enabling_visibility_controls.htm