Will "the Mighty" Strohl

HOW TO: Require Custom Profile Properties in DotNetNuke®

I see many questions in the DotNetNuke® forums about two related things.  The first question is, "How do I add a custom profile property?"  The inevitable follow-up question is, "How can I require my visitors to fill in the new custom property?"

Why would you want to have and/or require a profile property?  That is up to you.  But if you're reading this, you already know.  Just to let the rest of you know, this typically relates to some Web 2.0 or other business requirements.

DotNetNuke® makes both of these tasks very easy right out of the box.  The first thing you need to do is log in as an administrator.  Now, go into the Admin Menu, and then select the User Accounts page. 

Click the "Manage Profile Properties" link.

Click on

On the next page load, click on "Add New Profile Property" using either the Action Menu or the link at the bottom of the module.

Click on  

 Enter your intended values into the fields provided.  Note that the "Property Name" field is not what the web site visitor will see.  That will be done on the next step.  That being said, the "Property Name" cannot contain any spaces.  Also be sure that you check the "Required" checkbox.  Once you enter all of the required and inteded values, click the "Next" link.

Enter your values and check the

This next step is where you enter the values that the visitor will see.  Once you get these values entered, click the "Save Localized Text" link.  Be aware though that there will not likely be any feedback sent back to you if it is successful.  In order to move on and see if your profile property was saved, you will need to click the "Return to Profile Properties List" link.

Enter your values and then click the

This will be enough if you only want the property to be available.  And with the default installation, your existing users will be required to fill in this profile property the next time they log in.  But what about new visitors that are just registering for the first time?  Read on...

Go to the User Accounts page in the Admin Menu.  Once there, click the "User Settings" link.

Click the

Scroll down to the bottom of the User Settings page and find the setting labeled "Require a Valid Prodile for Registration".  Make sure that the checkbox is check and save your changes.

Check the checkbox to require a valid profile for registration

That's it!  You are all done.  Now both your existing users and new users will be required to fill in these settings.  Go ahead and test this.  Here is a shot of me trying to register on my test site following this demo.  Notice that my new profile property has a required symbol next to it like the other required properties.

Note that the new custom profile property is required

blog comments powered by Disqus