Enabling visibility controls

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The visibility selection drop-down list can be added to any field of the user's profile, not only the e-mail field as shown in the example in the How it works topic. This can be changed in Site Manager -> Development -> System tables. Choose to Edit (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 - when displaying a user's public profile using the User public profile web part
Edit profile - when editing a user's profile using the My account web part
Edit profile (MyDesk) - when editing the 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

 

The visibility field can be set in each of these forms.

 

devguide_clip0868

 

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 (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 (radio buttons - horizontal) from the Visibility control drop-down. Check the Allow user to change field visibility check-box and click OK.

 

devguide_clip0871

 

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.

 

devguide_clip0875

 

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.

 

devguide_clip0879

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?enabling_visibility_controls.htm