Skip Navigation

[Resolved] Unable to use wpv-user shortcode as a placeholder in messages

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

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 support ticket is created 3 years 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.

Our next available supporter will start replying to tickets in about 2.34 hours from now. Thank you for your understanding.

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 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by himanshuS 3 years ago.

Assisted by: Minesh.

Author
Posts
#1989657

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: hidden link

#1989989

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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%%
#1990839

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

#1990851

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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.

#1991205

My issue is resolved now. Thank you!

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