We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15568
    • 6 Posts
    Hello,

    I was wondered if it would be possible ton modify a custom field from the "front-end"?

    After I created a custom fields eg: [!WebLoginPE? &customFields=`exemple`!] and add an input in my form eg: [+user.exemple+] I can display the information with eg: [+view.exemple+] anywhere.

    But I didn’t find the way to modify it from the manageprofile.

    here the chunk eg:
    [+wlpe.message+]
    <div id="wlpeUser">
    	<form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="POST">
    		<fieldset id="wlpeUserProfileInput">
    			<div id="wlpeUserInfo">
    				<h3 id="wlpeProfileWelcome">Modifié le profile de [+view.username+] ([+view.fullname+])!</h3>
    				<p id="wlpeProfileInfo" class="info">Use this form to edit [+view.username+]'s profile information</p>
    			</div>
    
    			<legend>[+view.username+]'s User Profile</legend>
    			
    			<!-- These hidden fields are IMPORTANT! -->
    			<input type="hidden" name="internalKey" value="[+view.internalKey+]" />
    			<input type="hidden" name="username" value="[+view.username+]" />
    			
    			<label for="wlpeUserProfileFullName">Full Name
    			<input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+view.fullname+]" />
    			</label>
    
    			<label for="wlpeUserProfileEmail">Email
    			<input id="wlpeUserProfileEmail" type="text" name="email" value="[+view.email+]" />
    			</label>
    
    		<fieldset id="wlpeNewExempleArea">
    			<label for="wlpeUserProfileExemple">titre
    			<input size="20"  id="wlpeUserProfileExemple" type="text" name="exemple" value="[+view.exemple+]" />
    			</label>
    		</fieldset>
    
    		<fieldset id="wlpeUserProfileButtons">
    			<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveuserprofile">Save</button>
    			<button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
    			<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteuserprofile">Delete This Profile</button>
    		</fieldset>
    	</form>
    </div>
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Just add your custom field to the form; WLPE will deal with it (don’t forget to specify the custom field in that WLPE snippet parameter!).
        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
        • 15568
        • 6 Posts
        grin YES!

        It was that!

        I forget to specify the custom field in that WLPE snippet parameter!!!

        eg:
        [!WebLoginPE? &type=`manager` &manageProfileTpl=`exempleTpl` &customFields=`exempleField`!]

        thank you!