Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Important security fix: 2.1.10, released 4 May.

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

edited April 2011 in Vanilla 2.0 Help
Hello,
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?

Comments

  • 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.

    Anyone?

  • 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
    application>dashboard>controllers>class.entrycontroller.php

    line 1016

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

    to

    $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

    edit:
    for TOS change the line 1013

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

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

  • inside83inside83 Banja Luka New

    @fh111
    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 1

    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
    applications/dashboard/views/entry/registerapproval.php

    <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>
  • x00x00 MVP

    @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

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

    I'm using 'bootstrap' theme, so I could have copied
    applications/dashboard/views/entry/registerapproval.php
    to
    themes/bootstrap/views/entry/registerapproval.php
    and edit it there?

  • x00x00 MVP

    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/'?

  • x00x00 MVP

    you have to reproduce the file structure yes.

    grep is your friend.

Sign In or Register to comment.