hgs yükleme
My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help


Login |Register        Search

How to add checkbox data type for dnn user profiles

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   5/24/2012 11:12:28 AM    Author: Sebastian Leupold   Source: http://www.dotnetnuke.com/Resources/Blogs/EntryId/2905/DotNetNuke-5-Tip-add-checkbox-data-type-for-user-profiles.aspx   Views: 2923    0    0  
Tags:
User Profile Dotnetnuke


Posted by: Sebastian Leupold
12/6/2010  

Many countries require an activity by your user, if you want your terms of use be accepted during registration - and the easiest for this would be a checkbox as an additional user profile property. But although the checkbox control is already included with DNN, unfortunately, the registration of it is not included in default installation (hopefully it will be added to 5.6.1). To register it yourself, go to host :: SQL and run the following statement
IF NOT EXISTS (SELECT value FROM
 {databaseOwner}{objectQualifier}Lists
 WHERE ListName ='DataType' AND Value = 'Checkbox')
INSERT INTO {databaseOwner}{objectQualifier}Lists
(ListName, Value, Text, DefinitionId, PortalId, SystemList)
VALUES ('DataType', 'CheckBox', 'DotNetNuke.UI.WebControls.CheckEditControl, DotNetNuke', -1, -1, 1)


Now enter "Manage Profile Properties" in Admin :: User Accounts and define your new Property:
User Profile Property Definition
and proper text on the next page:
User Profile Property Texts

Save it, put it in proper order amongst all properties and save again.

Enter "User Settings" (still inside Admin :: Users) and set "Require a valid Profile for Registration" to true (hence another screen which would greatly benefit from using checkboxes instead of True - False option groups).

Update and logout. Click register and you will notice the new option:

Agree to Terms option

Have fun using DotNetNuke!

Rating People: 5   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.