Require date of birth

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

Not Ranked
Posts 1
Points 35
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
Top 10 Contributor
Posts 3,424
Points 65,565
CS Developers
Ben Tiedt replied on Wed, Nov 14 2007 12:15 AM

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
Not Ranked
Posts 2
Points 25
pdoc replied on Wed, Nov 14 2007 2:39 PM

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
Not Ranked
Posts 2
Points 25
pdoc replied on Mon, Nov 19 2007 3:10 PM

So the, any idea how to make it required?

 

  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,565
CS Developers
Ben Tiedt replied on Mon, Nov 26 2007 11:58 AM

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
Top 75 Contributor
Posts 294
Points 4,195

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
Top 10 Contributor
Posts 3,637
Points 54,925
TelligentSupportTeam

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.

 

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 75 Contributor
Posts 294
Points 4,195

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

  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,565
CS Developers
Ben Tiedt replied on Mon, Feb 18 2008 8:32 AM

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
Top 75 Contributor
Posts 294
Points 4,195

 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