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

    Hoping someone with an eagle eye can pick out the issue here with my custom Login registration page... Code as below:

    Issue is, all validation works, click register button, and page just refreshes, no new user created, no redirect to the relevant register success page etc... any ideas???

    P.S. Revo 2.3.5 and Login 1.9.0

    Cheers,

    dubbs.

    [[!Register? &submitVar=`registerbtn` &activation=`1` &activationResourceId=`72` &activationEmailTpl=`lgnActivateEmailTpl` &activationEmailSubject=`Thanks for Registering!` &submittedResourceId=`71` &usergroups=`MEMBERS` &validate=`nospam:blank, username:required:minLength=^6^, firstname:required, surname:required, email:required:email,  phone:required, addressline1:required, addressline2:required, county:required, postcode:required, workregion:required, schoolingphase:required, subjectsoffered:required, cvdoc:required` &placeholderPrefix=`reg.` ]]
    

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

      • 8168
      • 1,118 Posts
      Think, error might be in the form... have been playing with other examples... any ideas?

      <div class="register">
      <div class="registerMessage">[[!+reg.error.message]]</div>
      
      <form class="registerForm" action="[[~[[*id]]]]" method="post">
      <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
      
      <h2>About you...</h2>
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       
      <tr>
      <th class="topTableLHS"><label for="username">Username: *
      <span class="error">[[!+reg.error.username]]</span>
      </label></th>
      <td class="topTableRHS liveDataCell"><input type="text" name="username" id="username" value="[[!+reg.username]]" tabindex=1/></td>
      <th class="topTableLHS"><label for="addressline1">‪Address Line 1: *‬ <span class="error">[[!+reg.error.addressline1]]</span> </label></th>
      <td class="topTableRHS"><input type="text" name="addressline1" id="addressline1" value="[[!+reg.addressline1]]" tabindex=6/></td>
      </tr>
      
      <tr>
      <th class="topTableLHS"><label for="firstname">First name: *
      <span class="error">[[!+reg.error.firstname]]</span>
      </label></th>
      <td class="topTableRHS"><input type="text" name="firstname" id="firstname" value="[[!+reg.firstname]]" tabindex=2/></td>
      <th class="topTableLHS"><label for="addressline2">‪Address Line 2:‬ * <span class="error">[[!+reg.error.addressline2]]</span></label></th>
      <td class="topTableRHS"><input type="text" name="addressline2" id="addressline2" value="[[!+reg.addressline2]]" tabindex=7/></td>
      </tr>
      
      <tr>
      <th class="topTableLHS"><label for="surname">Surname: *
      <span class="error">[[!+reg.error.surname]]</span>
      </label></th>
      <td class="topTableRHS"><input type="text" name="surname" id="surname" value="[[!+reg.surname]]" tabindex=3/></td>
      <th class="topTableLHS"><label for="addressline3">‪Address Line 3:‬</label></th>
      <td class="topTableRHS"><input type="text" name="addressline3" id="addressline3" value="[[!+reg.addressline3]]" tabindex=8/></td>
      </tr>
      
      <tr>
      <th class="topTableLHS"><label for="email">Email address: *
      <span class="error">[[!+reg.error.email]]</span>
      </label></th>
      <td class="topTableRHS"><input type="text" name="email" id="email" value="[[!+reg.email]]" tabindex=4/></td>
      <th class="topTableLHS"><label for="county">‪County:‬ *<span class="error">[[!+reg.error.county]]</span></label></th>
      <td class="topTableRHS"><input type="text" name="county" id="county" value="[[!+reg.county]]" tabindex=9/></td>
      </tr>
      
      <tr>
      <th class="topTableLHS"><label for="phone">Phone number: *
      <span class="error">[[!+reg.error.phone]]</span>
      </label></th>
      <td class="topTableRHS"><input type="text" name="phone" id="phone" value="[[!+reg.phone]]" tabindex=5/></td>
      <th class="topTableLHS"><label for="postcode">‪Post code: *‬ <span class="error">[[!+reg.error.postcode]]</span></label></th>
      <td class="topTableRHS"><input type="text" name="postcode" id="postcode" value="[[!+reg.postcode]]" tabindex=10/></td>
      </tr>
      
      
      </table>
      
      <h2>Teaching experience...</h2>
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      
      <tr>
      <th class="topBottomLHS"><label for="workregion">Area of country seeking work: *:
      <span class="error">[[!+reg.error.workregion]]</span>
      </label></th>
      <td class="topBottomRHS"><select name="workregion" multiple="multiple" size="5" tabindex=11>
      <option value="South West" [[!+reg.membertype=`South West`]]>South West</option>
      <option value="London" [[!+reg.membertype=`London`]]>London</option>
      <option value="South West" [[!+reg.membertype=`South West`]]>South West</option>
      <option value="London" [[!+reg.membertype=`London`]]>London</option>
      <option value="South West" [[!+reg.membertype=`South West`]]>South West</option>
      <option value="London" [[!+reg.membertype=`London`]]>London</option>
      <option value="South West" [[!+reg.membertype=`South West`]]>South West</option>
      <option value="London" [[!+reg.membertype=`London`]]>London</option>
      </select>
      <p class="registerForm_noteText">Note - You can select more than one by clicking the ctr key when clicking</p>
      </td>
      </tr>
      
      <tr>
      <th class="topBottomLHS"><label for="schoolingphase">Schooling phase: *:
      <span class="error">[[!+reg.error.schoolingphase]]</span>
      </label></th>
      <td class="topBottomRHS"><select name="schoolingphase" tabindex=12>
      <option value="" [[!+reg.membertype=``]]>Please select...</option>
      <option value="Primary" [[!+reg.membertype=`Primary`]]>Primary</option>
      <option value="Secondary" [[!+reg.membertype=`Secondary`]]>Secondary</option>
      </select></td>
      </tr>
      
      <tr>
      <th class="topBottomLHS"><label for="subjectsoffered">Subjects offered: *
      <span class="error">[[!+reg.error.subjectsoffered]]</span>
      </label></th>
      <td class="topBottomRHS"><select name="subjectsoffered" multiple="multiple" size="10" tabindex=13>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      <option value="Maths" [[!+reg.membertype=`Maths`]]>Maths</option>
      <option value="English" [[!+reg.membertype=`English`]]>English</option>
      <option value="Science" [[!+reg.membertype=`Science`]]>Science</option>
      </select>
      <p class="registerForm_noteText">Note - You can select more than one by clicking the ctr key when clicking</p>
      </td>
      </tr>
      
      <tr>
      <th class="topBottomLHS"><label for="cvdoc">Upload your CV: *
      <span class="error">[[!+reg.error.cvdoc]]</span>
      </label></th>
      <td class="topBottomRHS"><input type="file" name="cvdoc" id="cvdoc" value="[[!+reg.cvdoc]]" class="cvBtn" tabindex=14/>
      <p class="registerForm_noteText">Note - This should be in DOC, DOCX or PDF format please</p>
      </td>
      </tr>
      
      
      </table>
      
      <div class="form-buttons">
      <input type="submit" name="registerbtn" value="Register" class="registerForm_btn" tabindex=15/>
      </div>
      
      </form>
      
      <p class="registerForm_mandatoryNote">* denotes mandatory field</p>
      
      </div>
      </div>
      
        • 8168
        • 1,118 Posts
        Is this not working because I don't have a password input field? I was hoping for MODx to set that up dynamically for the user... Is this why my form is not working???
          • 22840
          • 1,572 Posts
          Shouldn't there be quotes around the values in you tabindex, that could be 1 issue
          • discuss.answer
            • 8168
            • 1,118 Posts
            Quote from: paulp at Sep 16, 2015, 04:09 PM
            Shouldn't there be quotes around the values in you tabindex, that could be 1 issue

            Don't think that is the issue - just added a password field and now it all works... seems to not work without the password field included for a user to set their own PW... odd!
              • 46886
              • 1,154 Posts
              Login is quite balky but usually can work finally. I have def had times where messing with it makes it work even though nothing changed in the code.

              Interesting about the PW though. Anything in the documentation about it? Maybe the issue is that reset PW has this function but reset can't be used until the user is created. Otherwise its a bit odd that the system (really the login extra) has this ability but it can't be used in registration.

              In order to get the system to do it for you, you would need to 'tell' it to, it won't be automatic. In theory. Maybe a prehook?
                • 3749
                • 24,544 Posts
                I agree with nuan88, a prehook should be able to generate a unique password and fill in the password field for you. I think it could be a hidden field, but I'm not sure.
                  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
                  • 8168
                  • 1,118 Posts
                  Quote from: BobRay at Sep 17, 2015, 06:19 AM
                  I agree with nuan88, a prehook should be able to generate a unique password and fill in the password field for you. I think it could be a hidden field, but I'm not sure.

                  OK thanks