Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Remove 'Why you do want to join' and 'terms of service'

edited April 2011 in Vanilla 2.0 - 2.8
for my forum I want to remove the fields 'Why you do want to join?' and ' I agree to the terms of service'.

I have already removed the lines in the file 'registerapproval.php'. The fields don't appear any longer but I'm still promted 'Why do you want to join?' and 'Agree to terms ...' on the top of the page.

It seems that these two fields are mandatary. How can I avoid this?


  • dokdok
    edited August 2011
    I would like to remove these as well.
    "why do you want to join?" TOS and Gender.

    I too attempted the change to registerapproval.php as suggested here: How to customize the 'Apply for Membership' form

    As elchfan discovered, hiding the fields is not the solution.


  • BUMP.

    I'm also able to remove the appropriate fields, but validation is still looking for them. This is a pretty critical requirement.

  • fh111fh111 Vanilla Padawan ✭✭
    edited September 2012

    additionally to taking out the lines in registerapproval

    go to

    line 1016

    $this->UserModel->Validation->ApplyRule('DiscoveryText', 'Required', 'Tell us why you want to join!');


    $this->UserModel->Validation->ApplyRule('DiscoveryText', 'Optional', 'Tell us why you want to join!');

    where "Optional" was only a guess, but it did make it possible to register without the field

    for TOS change the line 1013

    $this->UserModel->Validation->ApplyRule('TermsOfService', 'Required', T('You must agree to the terms of service.'));

    of course this will only work as long as you don't update the core files

  • inside83inside83 Banja Luka New

    This only sets TOS and 'Why you do want to join' as optional.
    It does not remove it completely.

  • inside83inside83 Banja Luka New
    edited April 2015

    I just tested on v2.1.9 and it works.
    I was able to register as a new user after this.

    If you want to disable TOS, Gender and 'Why you want to join' you need to comment out the following lines in
    <li class="Gender"> <?php // echo $this->Form->Label('Gender', 'Gender'); // echo $this->Form->RadioList('Gender', $this->GenderOptions, array('default' => 'u')) ?> </li> <li> <?php // echo $this->Form->Label('Why do you want to join?', 'DiscoveryText'); // echo $this->Form->TextBox('DiscoveryText', array('MultiLine' => TRUE, 'Wrap' => TRUE)); ?> </li> <?php $this->FireEvent('RegisterFormBeforeTerms'); ?> <li> <?php // echo $this->Form->CheckBox('TermsOfService', $TermsOfServiceText, array('value' => '1')); ?> </li>

  • @inside83 you don't modify core files. You can either copy the view to your theme then edit it, or you could load a different view through your theme.

    grep is your friend.

  • inside83inside83 Banja Luka New

    I didn't know that and I already changed a bunch of files :/

    I'm using 'bootstrap' theme, so I could have copied
    and edit it there?

  • yes becuase they will get overwritten on update.

    grep is your friend.

  • inside83inside83 Banja Luka New

    But that is the way about it?
    Even thou there is no 'entry' folder in 'themes/bootstrap/views/'?

  • you have to reproduce the file structure yes.

    grep is your friend.

Sign In or Register to comment.