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

    I'm trying to setup the register function on my local machine, I've installed Discuss and have it logging in/logging out, but when I use the example Register code (http://rtfm.modx.com/display/ADDON/Register.Example+Form+1) it seems to completely mess up my template.

    I've added the following to a chunk called RegisterForm :
    <h2>Register</h2>
     
    [[!Register?
        &submitVar=`registerbtn`
        &activationResourceId=`12`
        &activationEmailTpl=`myActivationEmailTpl`
        &activationEmailSubject=`Thanks for Registering!`
        &submittedResourceId=`45`
        &usergroups=`Marketing,Research`
        &validate=`nospam:blank,
      username:required:minLength=^6^,
      password:required:minLength=^6^,
      password_confirm:password_confirm=^password^,
      fullname:required,
      email:required:email`
        &placeholderPrefix=`reg.`
    ]]
     
    <div class="register">
        <div class="registerMessage">[[!+reg.error.message]]</div>
     
        <form class="form" action="[[~[[*id]]]]" method="post">
            <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
     
            <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]
                <span class="error">[[!+reg.error.username]]</span>
            </label>
            <input type="text" name="username" id="username" value="[[!+reg.username]]" />
     
            <label for="password">[[%register.password]]
                <span class="error">[[!+reg.error.password]]</span>
            </label>
            <input type="password" name="password" id="password" value="[[!+reg.password]]" />
     
            <label for="password_confirm">[[%register.password_confirm]]
                <span class="error">[[!+reg.error.password_confirm]]</span>
            </label>
            <input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" />
     
            <label for="fullname">[[%register.fullname]]
                <span class="error">[[!+reg.error.fullname]]</span>
            </label>
            <input type="text" name="fullname" id="fullname" value="[[!+reg.fullname]]" />
     
            <label for="email">[[%register.email]]
                <span class="error">[[!+reg.error.email]]</span>
            </label>
            <input type="text" name="email" id="email" value="[[!+reg.email]]" />
     
            <br class="clear" />
     
            <div class="form-buttons">
                <input type="submit" name="registerbtn" value="Register" />
            </div>
        </form>
    </div>


    This is then called in the content via [[$RegisterForm]] and the output is shown in the attached picture.

    Any help appreciated, it's probably something I've overlooked!

    Thanks
      • 3109 ☆ A M B ☆
      • 894 Posts
      Try changing your template to the MODX base template and see if it works, if it does its an issue with your template. Make sure you are not using any striptags or strl output modifiers for your content area.

      Good luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 28582
        • 20 Posts
        Thanks for the reply, I tried with the base template and unfortunately it does the same thing.
        The only code in the content area is the chunk call:
        [[$RegisterForm]]

        And the code to call the content in the template is:
        <div id="content">
        [[*content]]
        </div> <!-- close #content -->


        Cheers
          • 3109 ☆ A M B ☆
          • 894 Posts
          I don't want to sound like a smart ass here but did you install the Login extra? It is needed in order for Regsiter to work.

          Also if you are running this on your local you will most likely not get any emails since localhost won't send emails unless you do something like this

          Good luck.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 28582
            • 20 Posts
            Yeah the Login extra is installed, as we can login/logout of the forum and that's all working fine.

            I know the emails won't send at the moment, however we can't even see the form for people to register as it seems to completely break any template! Even with the blank template, only the submit button is visible.
              • 3109 ☆ A M B ☆
              • 894 Posts
              Try changing the template to empty it should display the form unless your using the wrong chunk name, check your error logs to see if there's any clues.
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 28582
                • 20 Posts
                Yeah got it working now with the Blank template (must of been cached or something earlier) must be something in the basic template I created! Will go check through it all, at least I know where the problem is now wink

                Thanks for the help!
                  • 3109 ☆ A M B ☆
                  • 894 Posts
                  Glad to help.
                    Benjamin Marte
                    Interactive Media Developer
                    Follow Me on Twitter | Visit my site | Learn MODX