We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9827
    • 17 Posts
    Hi,

    I have some troubles to get the register snippet working. I’m using MODx 2.0.8-pl and have configured the registering as described in http://rtfm.modx.com/display/ADDON/Register.Example+Form+1. In addition I’m using Babel - maybe that causes some trouble (?).
    Calling the register and viewing the form works as expected, submitting the form results in clearing the form (value="") and in printing out all errors (This field is required.)

    Here’s my call of the register snippet:
    [[!Register?
      &submitVar=`registerbtn`
      &activationResourceId=`23`
      &activationEmailTpl=`SubTpl_Login_RegistrationEmail`
      &activationEmailSubject=`Thanks for Registering!`
      &submittedResourceId=`1`
      &usergroups=`SignedUpUser`
    ]]
    [[$SubTpl_Login_RegisterForm]]

    &activationResourceId is present with ID 23 and has [[!ConfirmRegister]] inside.
    &usergroups, SignedUpUser is present.

    Here’s my form ( [[$SubTpl_Login_RegisterForm]] ):
    <div class="login-wrap">
      <div class="login-registerMessage">[[+error.message]]</div>
       
      <form class="form" action="[[~[[*id]]]]" method="post">
        <input type="hidden" name="nospam:blank" value="" />
         
        <label for="login-username">[[%register.username? &namespace=`login` &topic=`register`]]</label>
        <input type="text" name="login-username:required:minLength=6" id="username" value="[[+username]]" />
        <span class="login-error">[[+error.username]]</span><br />
         
        <label for="login-password">[[%register.password]]</label>
        <input type="password" name="login-password:required:minLength=6" id="password" value="[[+password]]" />
        <span class="login-error">[[+error.password]]</span><br />
         
        <label for="login-password-confirm">[[%register.password_confirm]]</label>
        <input type="password" name="login-password-confirm:password_confirm=`password`" id="password_confirm" value="[[+password_confirm]]" />
        <span class="login-error">[[+error.password_confirm]]</span><br />
         
        <label for="login-fullname">[[%register.fullname]]</label>
        <input type="text" name="login-fullname:required" id="fullname" value="[[+fullname]]" />
        <span class="login-error">[[+error.fullname]]</span><br />
         
        <label for="login-email">[[%register.email]]</label>
        <input type="text" name="login-email:email" id="email" value="[[+email]]" />
        <span class="login-error">[[+error.email]]</span><br />
         
        <br class="clear" />
         
        <div class="form-buttons">
          <input type="submit" name="registerbtn" value="Register" />
        </div>
      </form>
    </div>


    Does anyone see some misconfiguration?

    Greetings,
    Mike
      • 9827
      • 17 Posts
      No one there to help me out?
        • 28215
        • 4,149 Posts
        You should set your value and error placeholders uncached ([[!+name]]).
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 9827
          • 17 Posts
          Hi,

          done. Set all placeholders to uncached, cleared the cache in the manager - unfortunately same behaviour.
          Are there some debug options to be set? It looks like that the post vars didn’t come to the snippet after submitting the form.
            • 32098
            • 31 Posts
            I am sure I understand less than you, but as it happens I am working on the same thing and have just managed to get a modified version of the Register snippet working this morning. I am comparing your setup to mine and can’t see any significant differences. Are you sure you have set up the usergroup successfully?

            Just for comparison here is what I have on my registration page:

            [[!Register? &submitVar=`registerbtn`  &activationResourceId=`29` &activationEmailTpl=`myActivationEmailTpl` &activationEmailSubject=`Thanks for Registering!`   
            &successMsg=`Thanks for registering!` &submittedResourceId=`36` &usergroups=`mailing` ]] 
            
            <p>
            <div class="register">     
            <div class="registerMessage">[[+error.message]]</div>           
            <form class="form" action="[[~[[*id]]]]" method="post">         
            <input type="hidden" name="nospam:blank" value="" />         
            <br />          
             <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]             
            <span class="error">[[+error.username]]</span>         </label>   
            <input type="text" name="username:required:minLength=3" id="username" value="[[+username]]" />  
            <br />   
                    
            <label for="email">Email:     
            <span class="error">[[+error.email]]</span>         </label>         
            <input type="text" name="email:email" id="email" value="[[+email]]" />                   
            <br class="clear" />                   
            <div class="form-buttons">             
            <input type="submit" name="registerbtn" value="Register" />         
            </div>     
            </form> 
            </div> <! -- end register -->
            </p>


            I have removed the password field (which requires some modification of the snippet because that field seems to be required for the snippet to work).
              • 9827
              • 17 Posts
              Thanks for your hint - it even won’t work. Maybe something went wrong during setup or configuration. I will try to setup MODx again...
                • 6724
                • 4 Posts
                Before you go off doing anything drastic, have you tried viewing your registration form in another browser? If you’re trying to get the form to process while you’re logged on as Admin Super User (from what I experience), and possibly even any other user (not limited to Admin Super User) the registration form won’t process. I had similar errors. So I was using Firefox to access the Manager as Admin Super User and tried filling up the form in Chrome or Safari or any other browser and it seemed to work.