I've created a user form which creates users from the front-end. I've also created custom user fields for this form. The problem is that these custom fields do not show up on my notification emails.
I visited the following URL and added the (user_id=”%%USER_USERID%%”) argument to my shortcode with no result.
https://toolset.com/documentation/user-guides/cred-user-forms-email-notifications/#
This is an example of my shortcode:
Contact Number: [types usermeta="avc-contact-number" user_id="%%USER_USERID%%" user_is_author="true" output="raw"][/types]
In addition to this, I would like to know what is the default code for a users first name and last name in this format: %%FIRST_NAME%% ? I've noticed that that this is not available on "insert body code" or "insert subject code" shortcode options.
Please let me know where I'm going wrong and with further suggestions. Thanks
Dear tino,
I can not duplicate same problem in my localhost, please check these:
1) You are using the latest version of Toolset plugins, especially the CRED + Types plugin
2) Deactivate other plugins and switch to wordpress default theme, and test again
For the user first name and last name, please try with Types shortcode, like this:
First name: [types usermeta="first_name" user_id="%%USER_USERID%%" output="raw"][/types]
Last name: [types usermeta="last_name" user_id="%%USER_USERID%%" output="raw"][/types]
Hi Luo,
thank you for your response. I managed to get all other custom fields working, but the first name and last name is still not working.
I tried your suggestion and every other combination but I don't understand why the first and last names are not returning. When I check the list of users in wordpress admin I see the first and last names are there, but are not being called back on notifications.
The user fields "first_name" and "last_name" are not created with Types plugin, so it can not be displayed with Types shortcode, but you can try with Views shortcode [wpv-user], for example:
First name: [wpv-user field="user_firstname" id="%%USER_USERID%%"]
Last name: [wpv-user field="user_lastname" id="%%USER_USERID%%"]
More help:
https://toolset.com/documentation/views-shortcodes/#wpv-user
Display user info. If the shortcode is inside a Views user query, it will display information for the user found in loop. Otherwise it will display information for the current logged-in user or the user with the specific id, when id attribute is set.
Hi Luo,
Thank you for your help, it worked.