Skip Navigation

[Resolved] How to display user_email field in CRED without showing the current value?

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

Problem:

I have a CRED User form that I want to use only for updating email address by a member.

But, even using the Generate Form wizard, the current email address is shown in the field. I have labeled the field "Enter New Email Address", so it should not show the current email value.

Solution:

There isn't such a built-in feature within Toolset form for editing user, the email field will display existed user's email value by default.

As a workaround, you can try these:

https://toolset.com/forums/topic/how-to-display-user_email-field-in-cred-without-showing-the-current-value/#post-1242802

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

This support ticket is created 5 years, 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Author
Posts
#1242439
Change-my-email.png

Tell us what you are trying to do?
I have a CRED User form that I want to use only for updating email address by a member.
But, even using the Generate Form wizard, the current email address is shown in the field. I have labeled the field "Enter New Email Address", so it should not show the current email value. (Current email value in screenshot is: jackeroo@microdisk.com.) I tried setting the value="" and placeholder="" in the cred_field shortcode, but it didn't help.

Thanks,
Jeff

#1242802

Hello,

There isn't such a built-in feature within Toolset form for editing user, the email field will display existed user's email value by default.

As a workaround, you can display an generic email field with empty value:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_generic_field

After user submits the form, use action hook cred_save_data to save it into database:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://codex.wordpress.org/Function_Reference/wp_update_user

#1243145

My issue is resolved now. Thank you!