user_custom_attributes_advanced_V1

Custom User Attributes (advanced)

Simple way to insert custom user attributes is via USER_CUSTOM_PROPERTIES property in Site Admin->Site Details->Customization (read more here). But what you achieve from the above is just basic ability to add the custom attributes. You cannot describe whether the attribute is text, date, checkbox or password. To do this and more advanced customization, continue reading (having some web development background is desired to do this customization).

USER_CUSTOM_PROPERTIES.js

You can create custom field definitions via a custom data source record. Go to SiteAdmin->CMS and create a new data source. Name the new data source USER_CUSTOM_PROPERTIES.js

To Add new custom field - click Add New

 

Describing fields

For each field, you can specify name, caption, type, mandatory, searchable and length

name Name of the field
caption Name of the field shown on user interface
Description Description will be placed on the signup page below the custom field.
type Allowed types are - text, date, password, dd, checkbox
length Length of the text field (to determine size of the text box)
mandatory Field is mandatory
searchable Show the field as searchable in user listing
visibleOnProfile Whether to show this field on user's profile page or not.
show on signup Capture this field on self signup form (if site's SHOW_CUSTOM_PROPERTIES_IN_SIGNUP property is turned ON)
show on signup page only Show this field on signup page only
adminOnly Show this field only on admin user's accounts & settings
listId A list id (of a separate data source) with actual values for the dd type fields
print Print this field in CSV download (currently available on course session's member listing download option)
Default Value  
Localized Caption  
Localized Description  
On Change Script  
On load Script  

Drop down fields ;

Dropdown list items will be added in Values Tab. For Each item Id, Value and Aliases can be added.

 

Date Field in Accounts & Settings

Drop down Field in Accounts & Settings

Custom Field in User Search

 

Collecting Additional Fields from users during self signup

Once you have added the custom field definitions, you can use custom property GOTO_PROFILE_AFTER_SIGNUP (Site Admin->Site Details->Customization) by specifying its value true to force users to go to Accounts and Settings page after they complete self signup.

You can also directly enable these fields on the self signup page by using the custom property SHOW_CUSTOM_PROPERTIES_IN_SIGNUP (Site Admin->Site Details->Customization) by specifying its value to be true.

 

Creating / Updating user's custom properties

Creating users (in bulk) with custom properties is similar to how you upload a CSV data from Site Admin->Create Users. What you do in additon to having username, firstname, lastname and email is add custom property values for each user in the input. The first line in the CSV should consist of field postion declaration (header) information, and must begin with # (hash) character.

You can follow any ordering in specifying the input fields, just mention the same on the first row  (header).

 


Rating: