We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39273
    • 61 Posts
    I am sure the problem is with me and not the code, but I am baffled. I have installed Login 1.8.1 on Revo 2.2.10-pl (advanced). The first snippet I set up was Login, and although I have not actually created an account yet I know that if I submit an empty form, all the errors appear telling me the fields are required. That's a good thing!

    Now I have set up the Register form and when I click on submit, I am returned to the form but with no sign of validation. No errors show. Below is my code. What am I doing wrong???

    [[!Register?
        &submitVar=`registerbtn`
        &activationResourceId=`12`
        &activationEmailTpl=`myActivationEmailTpl`
        &activationEmailSubject=`Thanks for Registering!`
        &submittedResourceId=`45`
        &usergroups=``
        &validate=`nospam:blank,
      username:required:minLength=^6^,
      password:required:minLength=^6^,
      password_confirm:password_confirm=^password^,
      firstname:required,
      lasstname:required,
      email:required:email`
        &placeholderPrefix=`reg.`
    ]]
    
    <div class="registerMessage"><span class="error">[[!+reg.error.message]]</span></div>
    <form action="[[~[[*id]]]]" method="post" class="loginLoginForm form form-horizontal" role="form">
      <div class="form-group">
        <label for="firstname" class="col-sm-2 control-label">Name</label>
        <div class="col-sm-5">[[!+reg.error.firstname]]
          <input type="text" class="form-control" name="firstname:required" id="firstname" placeholder="First Name" value="[[+firstname]]">
        </div>
        <div class="col-sm-5">[[!+reg.error.lastname]]
          <input type="text" class="form-control" name="lastname:required" id="lastname" placeholder="Last Name" value="[[+lastname]]">
        </div>
      </div>
      <div class="form-group">
        <label for="username" class="col-sm-2 control-label">[[%register.username? &namespace=`login` &topic=`register`]]</label>
        <div class="col-sm-10">[[!+reg.error.username]]
          <input type="text" class="form-control" name="username:required:minLength=6" id="username" placeholder="Choose A User Name" value="[[+username]]">
        </div>
      </div>
      <div class="form-group">
        <label for="email" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-10">[[!+reg.error.password]]
          <input type="text" class="form-control" name="email:email:required" id="email" placeholder="Current Email Address" value="[[+email]]">
        </div>
      </div>
      <div class="form-group">
        <label for="password" class="col-sm-2 control-label">Password</label>
        <div class="col-sm-5">[[!+reg.error.password]]
          <input type="text" class="form-control" name="password:required:minLength=6" id="password" placeholder="Create A Password" value="[[+password]]">
        </div>
        <div class="col-sm-5">[[!+reg.error.password_confirm]]
          <input type="text" class="form-control" name="password_confirm:password_confirm=`password`" id="password_confirm" placeholder="Confirm Your Password" value="[[+password_confirm]]">
        </div>
      </div>
      <div class="form-group">
        <label for="submit" class="col-sm-2 control-label"> </label>
        <div class="col-sm-10">
          <p><b>By clicking "Submit" I agree that:</b>
    <ul>
    <li>I have read and accepted the <a href="[[~40]]">Terms Of Use</a> and <a href="[[~41]]">Privacy Policy</a>.</li>
    <li>I may receive communications from this site and can change my notification preferences in my account.</li>
    <li>I am at least 18 years old.</li>
    </ul>
    </p>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <input type="hidden" name="isBusiness" id="isBusiness" value="0" />
          <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
          <input class="returnUrl" type="hidden" name="returnUrl" value="[[+request_uri]]" />
          <input class="loginLoginValue" type="hidden" name="service" value="login" />
          <button type="submit" name="registerbtn" class="btn btn-warning">Submit</button>
        </div>
      </div>
    </form>
    [ed. note: leemchildress last edited this post 12 years, 9 months ago.]
      • 39273
      • 61 Posts
      Yep, it was me. I for got to put 'value="Register"' in the submit button. Guess I need more coffee!