We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Hello, I have come upon an interesting problem.

    My registration process is all working well, the random password and username are delivered to the user, but while the snippet is generating a new password which is sent my email with a confirmation link, when I remove the password completely from my form, something goes wrong and the user is not registered and the email isn't sent.

    This is the code that I want to cut but can't, its just the password for registration.

    <li"><label for="password">[[%register.password]]
                <span class="error">[[!+reg.error.password]]</span>
            </label>
            <input type="password" name="password" id="password" value="[[!+reg.password]]" />


    The input itself doesn't matter as a new password gets generated anyway, and its confusing for my users for them to put in a password and then have it changed like that.

    Can login register a user without a password? Or could I possibly fix this field with some string? Its going to be overwritten anyway...then I could hide it from the user completely.

    Seems like a weird problem, I couldn't find anything in searching.

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      Does making it a hidden field work?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46886
        • 1,154 Posts
        I can hide it but it can't be empty, throws an error

        Could I use an output modifier...wait I got it!

             <li style="border-bottom:1px dashed #7e7e7e;"><label for="password">[[%register.password]]
                    <span class="error">[[!+reg.error.password]]</span>
                </label>
                <input type="hidden" name="password" id="password" value="[[!+reg.password:default=`12345678`]]]]" />


        just set a default value and hide the input!

        Thanks BobRay, you've done it again!

        [ed. note: nuan88 last edited this post 6 years ago.]
          • 3749
          • 24,544 Posts
          You're welcome. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting