On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I’ve been trying to add a register button after the login button and before the "Forget Your Password" text, but cannot seem to make it work. I cannot even find where the login button resides and I’ve been through every image directory I can find. Can anyone shed some light as to how to add the button?
    • Which version of MODx? What login snippet are you using? This is MODx; there are usually half-a-dozen ways (at least) to do something; we’ll need to know which one you’re using wink
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • I’m using version 1.0.4 and the snippet weblogin 1.1. I’ve tried adding a new table in the chunk.weblogin.tpl file and the weblogin.inc.php file but that doesn’t seem to work.
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td valign="top"><input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /></td>
                <td align="right">                                    
                <input type="submit" value="[+logintext+]" name="cmdweblogin" /></td>
              </tr>
              <tr>
              <a href="[~5~]">Registration</a>
              </tr>
            </table>
            </td>
          </tr>

        Also tried adding this:
        <img src="http://www.mywebsite/images/register.gif" alt="Register Here">


        Neither one seems to work. Is there another way to do this?
        • sad Still no solution for this problem. I guess I must not be asking the right questions. Sorry.
          • Normally you use a chunk for the form e.g. [!WebLogin? &tpl=`FormLogin` &loginhomeid=`[(site_start)]`!]
            Then just add the registration link to the chunk.
            • Thanks for your reply however using the chunk above didn’t work for me. I just don’t understand php at all. I’ve read through the wiki and as many posts as I can for creating chunks/snippets etc but I just don’t seem to be able to figure it out. I’ve been at this for over a week now so I guess I’ll just keep using the example content on the home page and hope everyone can find it.
              Automatic User Registration. Those that wish to comment on blogs must first create an account. This comes pre-configured with a "Captcha" anti-robot registration feature. View registration form
              • Creating your own form tpl isn’t php, it’s just HTML. Take the default login form tpl, copy it to a chunk and name it what you want; myForm for example. Then in the weblogin snippet, put &tpl=`myForm`. Check to make sure it still works exactly as it did. Then you can edit the form as you like, adding a link or button to the registration page.

                Here’s the default WebLogin form - it’s just HTML, with some specified HTML elements to act as separators for the various parts; WebLogin knows which part to display. You would add your link to the registration page in the first section, the "login form section".
                    <!-- #declare:separator <hr> --> 
                    <!-- login form section-->
                    <form method="post" name="loginfrm" action="[+action+]" style="margin: 0px; padding: 0px;"> 
                    <input type="hidden" value="[+rememberme+]" name="rememberme" /> 
                    <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                    <td>
                    <table border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><b>User:</b></td>
                        <td><input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" size="8" style="width: 150px;" value="[+username+]" /></td>
                      </tr>
                      <tr>
                        <td><b>Password:</b></td>
                        <td><input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" style="width: 150px;" value="" /></td>
                      </tr>
                      <tr>
                        <td><label for="chkbox" style="cursor:pointer">Remember me:  </label></td>
                        <td>
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td valign="top"><input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /></td>
                            <td align="right">                                    
                            <input type="submit" value="[+logintext+]" name="cmdweblogin" /></td>
                          </tr>
                        </table>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2"><a href="#" onclick="webLoginShowForm(2);return false;">Forget Password?</a></td>
                      </tr>
                    </table>
                    </td>
                    </tr>
                    </table>
                    </form>
                    <hr>
                    <!-- log out hyperlink section -->
                    <a href='[+action+]'>[+logouttext+]</a>
                    <hr>
                    <!-- Password reminder form section -->
                    <form name="loginreminder" method="post" action="[+action+]" style="margin: 0px; padding: 0px;">
                    <input type="hidden" name="txtpwdrem" value="0" />
                    <table border="0">
                        <tr>
                          <td>Enter the email address of your account <br />below to receive your password:</td>
                        </tr>
                        <tr>
                          <td><input type="text" name="txtwebemail" size="24" /></td>
                        </tr>
                        <tr>
                          <td align="right"><input type="submit" value="Submit" name="cmdweblogin" />
                          <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" /></td>
                        </tr>
                      </table>
                    </form>
                
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                • Thanks Susan for your reply. After some more trial and error and reading through Bob Rays website I finally got what bunk58 and you were trying to tell me. I created a new chunk with
                  Create Account<br /><a href="[~5~]"><img src="http://www.grstreamkeepers.com/webdev/newweb/assets/images/Registerbutton.gif"></a>

                  and then placed this
                  {{register}}
                  below this line
                  <a href="#" onclick="webLoginShowForm(2);return false;" id="forgotpsswd">Forget Your Password?</a>
                  {{register}}
                  	</fieldset>
                  in the formlogin template and voila it worked. Seems rather simple after I figured it out. Can’t believe I didn’t see it from the beginning. rolleyes