We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4706
    • 24 Posts
    I am trying to implement WebloginPE

    I have a chunk set up to a custom login TPL.. my issue is that when I put the call into the page the code as well as the form shows.

    My call is as follows
     [!WebloginPE? &type='simple' &LoginFormTpl='{{membersignin}}'!] 


    The form chunk is
    <form id="wlpeLoginform" name="wlpeLoginform" action="[~[*id*]~]" method="POST">       
    <input id="wlpeusername" type="text" name="wlpeUsername" value="username" style="position:absolute;z-index:11;color:#000000;font-family:'Verdana';font-size:13px;font-weight:normal;font-style:normal;text-align:left;border-width:1;border-color:#ffff00;border-style:solid;left:694px;top:34px;width:168px;height:20px;">
    
    <input id="wlpepassword" type="text" name="wlpePassword" value="password" style="position:absolute;z-index:12;color:#000000;font-family:'Verdana';font-size:12px;font-weight:normal;font-style:normal;text-align:left;border-width:1;border-color:#ffff00;border-style:solid;;left:694px;top:74px;width:168px;height:20px;">
    
    <button type="submit" id="wlpeLoginButton" name="service" value="Login" style="position:absolute;z-index:13;color:#00ff00;font-family:'Verdana';font-size:12px;font-weight:normal;font-style:normal;text-align:center;left:888px;top:71px;width:79px;height:26px;">Login</button>
    </form> 


    I’m goin nuts here... as I said in another thread... not the best coder in the world but learning by leaps and bounds... just need an additional hand up now and again.

    Thanks folks!

    PS... yes it is ugly Franken Code... but please don’t torch it.. it is young yet and means well!

    *EDIT* Still not solved...

    I found a related post from last fall... they suggested taking out WebLoginPE and reinstalling which I did and no luck.

    What is frustrating here is that it shows the form correctly but it adds the code to the page... black on black but still taking up space.

    The code reads as cached as well despite the call not being placed as such.

    Same action when I put the call into a chunk.
      "Are we there yet?"
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      You need to use the backtick ` (found on ~ key) in your snippet call and you also don’t need the {{}} for the chunk name as that is included by default.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 4706
        • 24 Posts
        Same error occurs.

        This is a custom form not included in the templates.php hence the chunk.
          "Are we there yet?"
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Your snippet call should look like this:
          [!WebloginPE? &type=`simple` &LoginFormTpl=`membersignin`!]
            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
            • 4706
            • 24 Posts
            So do I need to change something in the template.php then, since I am using my own form? I thought I needed to use the chunk to get the right form in that instance?

            That gives me a parse error that reads

            Parse error: syntax error, unexpected ’/’ in /home/content/b/s/p/bsplay/html/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 503
              "Are we there yet?"
              • 4310
              • 2,310 Posts
              I believe it should be &loginFormTpl= note the lowercase ’l’
                • 4706
                • 24 Posts
                Hmmm... same issues

                Slight progress I guess.. I have gone from the code and form to an inline parse error as noted above
                  "Are we there yet?"
                  • 4310
                  • 2,310 Posts
                  Here’s the code I’m successfully using on the login page :
                  [!WebLoginPE? &loHomeId=`140` &liHomeId=`139` &loginFormTpl=`login-form` &successTpl=`logged-in`!]
                    • 4706
                    • 24 Posts
                    So did you edit the template.php to include your adapted form?
                      "Are we there yet?"
                      • 4310
                      • 2,310 Posts
                      No.
                      If you use the loginFormTpl parameter :
                      &loginFormTpl=`login-form`

                      webloginpe will look for a chunk named login-form to use as the template.
                      Here’s my login-form chunk :
                      <h3>[+wlpe.message+]</h3>
                      <form id="wlpeLoginForm" action="[~[*id*]~]" method="post">
                      <table CELLSPACING="4" CELLPADDING="2">
                      <tr>
                      <td colspan="2"><p>Web User Login Form</p></td>
                      </tr>
                      <tr>
                      <td><label id="wlpeUsernameLabel" for="wlpeUsername">Username</label></td>
                      <td><input id="wlpeUsername" type="text" name="username" /></td>
                      <tr>
                      <td><label id="wlpePasswordLabel" for="wlpePassword">Password</label></td>
                      <td><input id="wlpePassword" type="password" name="password" /></td>
                      </tr>
                      <tr>
                      <td><label id="wlpeStayLoggedInLabel" for="wlpeStayLoggedIn">Stay Logged In</label></td>
                      <td><select id="wlpeStayLoggedIn" name="stayloggedin">
                      <option value="">No</option>
                      <option value="3600">1 Hour</option>
                      <option value="15400">4 Hours</option>
                      <option value="86400">1 Day</option>
                      <option value="604800">1 Week</option>
                      <option value="2678400">1 Month</option>
                      <option value="315569260">Forever</option>
                      </select></td>
                      </tr>
                      <tr>
                      <td colspan="2">
                      <button type="submit" id="wlpeLoginButton" name="service" value="login">Login</button>  
                      <button type="submit" id="wlpeReminderButton" name="service" value="forgot">Forgot Password</button>
                      </td>
                      </tr>
                      </table>
                      </form>

                      If you don’t use the parameter the built in default gets used from webloginpe.templates.php