Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 14

6apxatCurtisOdenconnectrleafmonster422 +9 guests

Can I make the birth date optional or remove it from the sign up form?

Played around with Vanilla 1x before but no serious experience with Vanilla. Just looking at Vanilla 2 and like it but I've been wondering if I can easily make the birth date optional or remove it from the sign up form? Any pointers?

Cheers,

D.

Comments

  • Okay I managed to do this but I had to comment out a couple of lines in some of the core files which I really didn't like doing. I know there must be nice way to override these functions and views so I guess I just have to find my way around a bit more. So far I haven't found a setting/variable switch to turn off the DOB requirement.

    So for anyone who is interested, this seems to be a successful dirty method of doing this:

    library/core/class.validation.php - comment out line 131
    //$this->AddRule('MinimumAge', 'function:ValidateMinimumAge');

    applications/garden/controllers/entry.php - comment out lines 210, 228, 262 & 303
    //$this->UserModel->Validation->ApplyRule('DateOfBirth', 'MinimumAge');

    Do this next step on whichever view you are using for user registration...

    applications/garden/views/entry/registerbasic.php - comment out lines 47 & 48
    //echo $this->Form->Label('Birth Date', 'DateOfBirth', array('class' => 'BirthDate'));
    //echo $this->Form->Date('DateOfBirth');

    Now go back and refresh your site's /entry/register page and you should notice the Birth Date field is gone and you can now register without errors.

    Hope this is useful.

    Derek.

    P.S. You can override views with a theme, so that would take care of the view part of this process... The core bits I'm still not sure about.
Sign In or Register to comment.