We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    I’ve added some custom fields and when users try to edit their profile it won’t save the changes. Here’s my snippet call:

    [!WebLoginPE? &type=`simple` &loginFormTpl=`LoginForm` &registerTpl=`InstantRegister` &userImage=`90000,110,110` &groups=`Paid Users` &customFields=`city,website,company,newsletter,newsletterfa` &profileTpl=`profile` &tosChunk=`tos` &regRequired=`email,username,fullname,password,company,website,tos` &inputHandler=`Subscribe to  Newsletter:userNewsletter:checkbox:()||Subscribe to Private Newsletter:userPrivateNewsletter:checkbox:()` &notify=`[email protected]` !]


    Here’s my profile template:
    [+wlpe.message+]
    <div id="wlpeUser" class="form-container">
    	<form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="POST">
    		<fieldset id="wlpeUserProfileInput">
    			<div id="wlpeUserInfo">
    				<h3 id="wlpeProfileWelcome">Hello [+user.fullname+] ([+user.username+])!</h3>
    				<p id="wlpeProfileInfo" class="info">Use this form to update your profile information</p>
    			</div>
    		
    			<legend>Your User Profile</legend>
    
    			<div><label for="wlpeUserProfileFullName">Full Name</label>
    			<input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+user.fullname+]" /></div>
    
    			<div><label for="wlpeUserProfileEmail">Email</label>
    			<input id="wlpeUserProfileEmail" type="text" name="email" value="[+user.email+]" /></div>
    			
    
    			<div><label for="wlpeUserProfilePhone">Phone number</label>
    			<input id="wlpeUserProfilePhone" type="text" name="phone" value="[+user.phone+]" /></div>
    			
    
    			<div><label for="wlpeUserProfileMobile">Mobile number</label>
    			<input id="wlpeUserProfileMobile" type="text" name="mobilephone" value="[+user.mobilephone+]" /></div>
    			
    
    			<div><label for="wlpeUserProfileFax">Fax number</label>
    			<input id="wlpeUserProfileFax" type="text" name="fax" value="[+user.fax+]" /></div>
    			
    
    			<div><label for="wlpeUserProfileState">State</label>
    			<input id="wlpeUserProfileState" type="text" name="state" value="[+user.state+]" /></div>
    
    			<div><label for="wlpeUserProfileCity">City</label>
    			<input id="wlpeUserProfileCity" type="text" name="city" value="[+user.city+]" /></div>			
    
    			<div><label for="wlpeUserProfileZip">Zip Code</label>
    			<input id="wlpeUserProfileZip" type="text" name="zip" value="[+user.zip+]" /></div>
    
    			<div><label for="wlpeUserProfileCompany">Company</label>
    			<input id="wlpeUserProfileCompany" type="text" name="company" value="[+user.company+]" /></div>
    
    			<div><label for="wlpeUserProfileWebsite">Website</label>
    			<input id="wlpeUserProfileWebsite" type="text" name="website" value="[+user.website+]" /></div>
    			
    			<div><label for="wlpeUserProfileComment">Comment/Signature</label>
    			<textarea id="wlpeUserProfileComment" name="comment">[+user.comment+]</textarea></div><br />
    
    <img class="profile_pic" src="[+user.photo+]" alt="[+user.username+]" title="[+user.fullname+]" height="100" width="100" />
    
    			<div style="float:left;"><label for="wlpeUserProfilePhoto" id="wlpeUserPhotoLabel">User Photo</label>
    			<input type="hidden" id="wlpeUserHiddenPhoto" name="userphoto" value="[+user.photo+]" />
    			<input id="wlpeUserProfilePhoto" type="file" name="photo" value="" /></div><div class="clearer"></div>
                            <p id="wlpeUserProfilePhotoInfo" class="info">No bigger than 100kb. will be resized to 100 x 100.</p>
    
                            <div><label for="userNewsletter" id="userNewsletterLabel">Subscribe to Newsletter</label>
                            <input type="checkbox" id="userNewsletter" name="newsletter" /></div><div class="clearer"></div>
    
                            <div><label for="userInvestorNewsletter" id="userprivateNewsletterLabel">Subscribe to Private Newsletter</label>
                            <input type="checkbox" id="userprivateNewsletter" name="privatenewsletter" /></div><div class="clearer"></div>
    			
    			<fieldset id="wlpeNewPasswordArea">
    				<legend id="wlpeNewPasswordAreaLegend">Change your password</legend>
    				<p id="wlpeNewPasswordInfo">Change your password <br /><span class="info">(leave blank if you do not want a new password).</span></p>
    
    				<div><label for="wlpeUserProfilePassword">New Password</label>
    				<input id="wlpeUserProfilePassword" type="password" name="password" value="" /></div>
    				
    
    				<div><label for="wlpeUserProfilePasswordConfirm">New Password (confirm)</label>
    				<input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm" value="" /></div>
    				
    			</fieldset>
    			
    		</fieldset>
    		<fieldset id="wlpeUserProfileButtons">
    			<div class="wple_buttons">
                            <button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofile">Save</button>
    			<button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
    			<button type="submit" id="wlpeProfileLogoutButton" name="service" value="logout">Logout</button>
    			<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile">Delete My Profile</button>
                            </div>
    		</fieldset>
    	</form>
    </div>


    Not sure why it’s not working. Thanks for looking!
      The MODx has you...
      Utah Web Design
      • 25803 ☆ A M B ☆
      • 721 Posts
      I had a similar problem, and I’m just learning to use this snippet but I’ve kept Snippet calls separate. For example, I have the a button setup to go to a Profile document that has this call on it:

      [!WebLoginPE? &type=`profile`&profileTpl=`profileform`&customFields=`clinicname`!]


      The button to get there is:

      <a href="[~13~]&service=profile" title="Profile">View Profile</a>


      Until I put the &customFields command in the call I could edit everything but that one. But type=`simple`, according to the documentation should be fine as well.
      My form code is:

      [+wlpe.message+]
      <div id="wlpeUser">
      	<form enctype="multipart/form-data" id="wlpeProfileForm" name="wlpeRegisterForm" action="[~[*id*]~]" method="POST">
      		<fieldset id="wlpeUserProfileInput">
             <legend>Your Profile</legend>
      				<h3 id="wlpeProfileWelcome">Hello [+user.fullname+] ([+user.username+]).</h3>
      				<p id="wlpeProfileInfo" class="info">Use this form to update your profile information.</p>
      			<p>
      			<label for="wlpeUserProfileFullName">Your Full Name</label>
      			<input type="text" id="wlpeUserProfileFullName" name="fullname" value="[+user.fullname+]" />
      			</p>
                  <p> 
      			<label for="wlpeUserProfileClinicName">Your Clinic Name</label>
      			<input type="text" id="wlpeUserProfileCinicName" name="clinicname" value="[+user.clinicname+]"  />
      			</p>
                  <p>		
      			<label for="wlpeUserProfileEmail">Your Email Address</label>
      			<input type="text" id="wlpeUserProfileEmail" name="email"  value="[+user.email+]"/>
      			</p>
                  <p>			
      			<label for="wlpeProfileUserName">Your Username</label>
      			<input type="text" id="wlpeProfileUserName" name="username" value="[+user.username+]"  />
      			</p>
      		</fieldset>
      			<fieldset id="wlpeNewPasswordArea">
      				<legend id="wlpeNewPasswordAreaLegend">Change your Password</legend>
      				<p id="wlpeNewPasswordInfo">Leave blank if you do not want a new password.</p>
      
      				<label for="wlpeUserProfilePassword">New Password</label>
      				<input id="wlpeUserProfilePassword" type="password" name="password" />
      				
      
      				<label for="wlpeUserProfilePasswordConfirm">New Password (confirm)</label>
      				<input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm"  />				
      			</fieldset>
      <fieldset id="wlpeUserProfileButtons">
                  <legend>Save Changes</legend>
      			<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofile" class="submit">Save</button>
      			<button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel" class="submit">Done</button>
      			<button type="submit" id="wlpeProfileLogoutButton" name="service" value="logout" class="submit">Logout</button>
      			<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile" class="submit">Delete My Profile</button>
      		</fieldset>
      	</form>
      </div>
      


      Interestingly, though I can get users to update their profile successfully, I cannot do the same for the manager.
        • 4041
        • 788 Posts
        If you mean that the web users custom fields profile info cannot be modified from the manager back end, that is due to the custom fields not being recognized by the manager.

        To enable this functionality would require either a front end admin panel available for managers or modifying a couple of the MODx manager core files.
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 4749
          • 623 Posts
          Yes, I realize that managing the profiles from the backend would require a lot of extra work. Hopefully some work with Scotty can find a nice solution for managing users and allowing users to update their own profiles.
            The MODx has you...
            Utah Web Design
            • 25551 ☆ A M B ☆
            • 1,231 Posts
            They can update their profiles.......

            I have custom fields and they are completely editable in their profiles. If you visit your profile it gives you the previous information that was submitted and allows you to save the updates. grin
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
              • 4749
              • 623 Posts
              Yeah, my custom fields show up too in the profile they’re just not storing. But, what I meant by the previous comment is maybe there’s a happy medium to have those custom fields show up in the manager without a lot of hacking... Maybe by posting it as a TV so at least it’s visible in the manager or something. That’s all I meant. smiley
                The MODx has you...
                Utah Web Design
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                Oh I see.... Yeah it would be nice to be visible in the manager. Sorry, I thought you meant in the user profile page on the site not the manager. rolleyes
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart