We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    &loginFormTpl - Lets you define a chunk that will be used for login.

    If I want to include a mandatory checkbox in my login form, how to I ensure webloginPE will validate the checkbox (without hacking the class?)

    I tried putting onclick JavaScript on the login <button> but it is being ignored.

      • 15083
      • 697 Posts
      OK so I just hacked the class....
      Add these lines to webloginpe.class.php after line 222 (I think), Add a checkbox to your chunk with name="terms"

      $terms = 0;
      if(isset($_POST[’terms’])) { $terms = 1; }
      if ($terms == 0)
      {
      $this->FormatMessage(’Please accept our terms and conditions!’);
      return;
      }