Accueil › Toolset Professional Support › [Résolu] Unable to use wpv-user shortcode as a placeholder in messages
Problem:
How to use [wpv-user] shortcode inside form email notification
Solution:
You should use the [wpv-user] shrotcode with placeholder that returns the ID.
You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/unable-to-use-wpv-user-shortcode-as-a-placeholder-in-messages/#post-1990851
Relevant Documentation:
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 |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)
Marqué : Toolset Forms, User-registration forms
Documentation connexe :
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par himanshuS Il y a 4 années et 4 mois.
Assisté par: Minesh.
I am creating a user with the CRED form and then sending a notification to the user about registration. I am using a few views shortcodes to pass information in the email and all works fine except for the user's first name and user's last name.
What could I be missing?
Explainer video here: lien caché
Hello. Thank you for contacting the Toolset support.
Toolset Forms offers the placeholders that you should use to display the user first name and last name.
For example:
%%USER_FIRST_NAME%%
And
%%USER_LAST_NAME%%
Minesh,
I understand the placeholders. My question is why would the shortcode not work when I created a user using the cred form? And if does not work, then why is that option even there on the form?
Regards,
Himanshu
As suggested, either you should go with the placeholders I shared.
if you insist to go with shortcode, following should work:
[wpv-user field="user_firstname" id="%%USER_USERID%%"]
And
[wpv-user field="user_lastname" id="%%USER_USERID%%"]
As when form is submitted there will be no User ID available, that is why we need to use placeholder.
My issue is resolved now. Thank you!