Skip Navigation

[Resolved] I like to have in the profile editing page with password field

This thread is resolved. Here is a description of the problem and solution.

Problem:

In Toolset form for editing user, how to setup the field for updating user's password.

Solution:

In your case, it is not recommended to use the [cred_generic_field], if you use it, you will need to setup PHP custom codes to update the user's password.

So you just need to uncheck the "auto generate password" box placed this two fields bellow in the form:

https://toolset.com/forums/topic/i-like-to-have-in-the-profile-editing-page-with-password-field/#post-1090114

Relevant Documentation:

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by theW 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1090037

Thank you so much Luo.
I found the setting you described.
The message is gone indeed.

By the way, have there been updates to the password fields?
As you see the function I like to have in the profile editing page is like bellow:

<p><small>If you'd like to change your password type a new one.<br> 
Otherwise leave the bellow blank.</small></p>  

<div class="row">
	<div class="form-group col-sm-6">
		<label>New Password</label>
		       [cred_generic_field field='user_pass' type='textfield' class='' urlparam='']
{
"required":0,
"validate_format":0,
"default":""
}
[/cred_generic_field]
	</div>
	<div class="form-group col-sm-6">
		<label>Confirm New Password</label>
		[cred_generic_field field='user_pass2' type='textfield' class='' urlparam='']
{
"required":0,
"validate_format":0,
"default":""
}
[/cred_generic_field]
	</div>
</div>

Would the code above still function or do I need to make any updates?
I noticed unchecking the "auto generate password" box placed this two fields bellow in the form:

	<div class="form-group">
		<label>Password</label>
		[cred_field field='user_pass' value='' urlparam='' class='form-control' output='bootstrap']
	</div>

	<div class="form-group">
		<label>Repeat Password</label>
		[cred_field field='user_pass2' value='' urlparam='' class='form-control' output='bootstrap']
	</div>

.. Which I removed, and my whole code looks like this:

[creduserform class='cred-user-form cred-keep-original']
	[cred_field field='form_messages' value='' class='alert alert-warning']

<div class="row">
	<div class="form-group col-sm-6">
		<label>First Name</label>
		[cred_field field='first_name' value='' urlparam='' class='form-control' output='bootstrap']
	</div>
	<div class="form-group col-sm-6">
		<label>Last Name</label>
		[cred_field field='last_name' value='' urlparam='' class='form-control' output='bootstrap']
	</div>
</div>

<div class="row">
	<div class="form-group col-sm-6">
		<label>Email</label>
		[cred_field field='user_email' value='' urlparam='' class='form-control' output='bootstrap']
	</div>
	<div class="form-group col-sm-6">
		<label>Phone</label>
		[cred_field field='phone' value='' urlparam='' class='form-control' output='bootstrap']
	</div>
</div>

<p><small>If you'd like to change your password type a new one.<br> 
Otherwise leave the bellow blank.</small></p>  

<div class="row">
	<div class="form-group col-sm-6">
		<label>New Password</label>
		       [cred_generic_field field='user_pass' type='textfield' class='' urlparam='']
{
"required":0,
"validate_format":0,
"default":""
}
[/cred_generic_field]
	</div>
	<div class="form-group col-sm-6">
		<label>Confirm New Password</label>
		[cred_generic_field field='user_pass2' type='textfield' class='' urlparam='']
{
"required":0,
"validate_format":0,
"default":""
}
[/cred_generic_field]
	</div>
</div>



<div class="row">
	<div class="form-group col-sm-6">
		<label><span style="color: #808080;"><small>Usernames cannot be changed.</small></span></label>
		[cred_field field='user_login' post='user' value='' urlparam='' readonly='true' class='form-control' output='bootstrap']
	</div>
	<div class="form-group col-sm-6">
		[cred_field field='form_submit' value='Update' urlparam='' class='btn btn-primary btn-lg' output='bootstrap']
	</div>
</div>

[/creduserform]
#1090114

Hello,

In your case, it is not recommended to use the [cred_generic_field], if you use it, you will need to setup PHP custom codes to update the user's password.

So you just need to uncheck the "auto generate password" box placed this two fields bellow in the form:

<div class="form-group">
    <label>Password</label>
    [cred_field field='user_pass' value='' urlparam='' class='form-control' output='bootstrap']
</div>
 
<div class="form-group">
    <label>Repeat Password</label>
    [cred_field field='user_pass2' value='' urlparam='' class='form-control' output='bootstrap']
</div>

I have tested it with your website duplicator package in my localhost, it works fine.

#1090395

Thank you so much again!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.