Require date of birth

rated by 0 users
This post has 9 Replies | 5 Followers

pdocII
Not Ranked
Posts 1
Points 35
By: pdocII
Posted: Wed, Nov 7 2007 12:50 PM

Anyone have any experience making the community meet COPPA requirements?  I want to require the applicant to select their birthdate prior to joining.  I have made it so that the birthday selector is on the join page, but I'm having trouble making it a required field.  It will not work asp.net validators and I can't seem to find the element using javascript...any ideas? 

 
  • Post Points: 35 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Wed, Nov 14 2007 12:15 AM In reply to

Which version of Community Server are you using?

How have you added the birthdate selector to the page?

Ben Tiedt's Blog

 
  • Post Points: 20 |
pdoc
Not Ranked
Posts 2
Points 25
By: pdoc
Posted: Wed, Nov 14 2007 2:39 PM In reply to

CS 2007.

I did add a birthdate selector to the page.  I tried to validate that the user selects a birthdate and couldn't get it to work.  Any suggestions for making sure people select a birthdate?  I would like to set the text portion to "select.." and only allow the join button to enable after a selection has been made.  Unfortunately, I had no luck... Any thoughts? 

 

 
  • Post Points: 5 |
pdoc
Not Ranked
Posts 2
Points 25
By: pdoc
Posted: Mon, Nov 19 2007 3:10 PM In reply to

So the, any idea how to make it required?

 

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Mon, Nov 26 2007 11:58 AM In reply to

The <CSControl:CreateUserForm /> control does not support specifying the birth date so adding a <TWC: DateTimeSelector runat="server" id="Birthday" DateTimeFormat="MMMM d, yyyy" ShowCalendarPopup="true" /> control will not save the birth date information.

I'd suggest implementing a sub-form control (see example here: http://docs.communityserver.org/wiki/page.aspx/312/how-to-extend-user-registration-using-sub-forms/) that supports specifying the birthdate for newly created users and implements the proper validation.  To ensure that the value of the DateTimeSelector is set, you can override the IsValid() method of the base sub-form control and check the value of the birthdate DateTimeSelector, returning false if it is not set.

Ben Tiedt's Blog

 
  • Post Points: 20 |
NorthlandSticks
Top 75 Contributor
Posts 271
Points 3,885
By: NorthlandSticks
Posted: Sun, Feb 17 2008 12:24 AM In reply to

I have needed to do this, and have been attempting it on and off for some time now. I'm affraid it's beyond my limited programming skills. Has anybody out there been able to do this? 

 
  • Post Points: 20 |
afscrome
Top 10 Contributor
Posts 2,705
Points 39,825
TelligentSupportTeam
By: afscrome
Posted: Sun, Feb 17 2008 4:12 AM In reply to

You'll need to implement this as a Subform.  For an example of how to write a subform to work,  CommunityServer.Controls.PostTagsSubForm may be useful as an example.

 

 
  • Post Points: 20 |
NorthlandSticks
Top 75 Contributor
Posts 271
Points 3,885
By: NorthlandSticks
Posted: Sun, Feb 17 2008 6:03 PM In reply to

 Yeah, I was able to do a subform for my country dropdown, but I can't get birthdate to work.

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Mon, Feb 18 2008 8:32 AM In reply to

NorthlandSticks:
but I can't get birthdate to work.
 

What didn't work?

Because the birthdate is set on the user's profile, and the profile is created when the user is saved, the setting of the birthdate will need to occur when the ApplyChangesAfterCommit() method of the sub-form is called.  In the example on the docs.cs.org site, this method is not used, but its definition is the same as ApplyChangedBeforeCommit() with regards to the name change.

Ben Tiedt's Blog

 
  • Post Points: 20 |
NorthlandSticks
Top 75 Contributor
Posts 271
Points 3,885
By: NorthlandSticks
Posted: Mon, Feb 18 2008 12:29 PM In reply to

 I guess I just don't know the right way to include that birthdate control in my subform.

 
  • Post Points: 5 |
Page 1 of 1 (10 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com