Fork me on GitHub

Howdy, Stranger!

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

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Critical: Update to 2.1.8, released 15 Jan.

How do you add age to sign up process / post information ?

edited October 2011 in Vanilla 2.0 Help
Our forum requires that the users age and gender appear on the discussion/comment.

When doing a google search, I noticed that age was a field available (previous version?) on vanilla forum, but can not see it on the current version of vanilla.

How do I add this back on vanilla so:

1) A user has to enter it at signup
2) It is displayed on the discussion/comment information next to the author name

Best Answer

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    To do this you are going to have to create a theme and possibly a plugin.

    1. Copy /applications/dashboard/views/entry/registercaptcha.php into your theme's /views/entry/registercaptcha.php folder. If you aren't using recaptcha registration then copy the appropriate view.

    2. Add the input for the DateOfBirth field that is already in the user table. If you want to add age instead then you'll need to add the age field to the database.

    3. The field should automatically save to the database when the user registers.

    To display the data you want you are going to need to attach to some events. You can do this in a plugin or the theme hooks file.

    I'd recommend attaching to say:
    public function DiscussionController_CommentInfo_Handler($Sender, $Args) {
    To find out which events you can tie into on the display you can grab the Eventi plugin.
Sign In or Register to comment.