Skip Navigation

[Resolved] Send Email Notification with fields value

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

Problem:
The user would like to include user fields inside a user form notification email. The Types shortcodes were not working for him.

Solution:
We need to pass the post ID or the user ID to the Types shortcodes inside a form notification.

// For post forms
[types field='number'  item='%%POST_ID%%'][/types]

// For user forms
[types usermeta='civil-id' user_id='%%USER_USERID%%'][/types]
This support ticket is created 3 years, 9 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: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by salimA 3 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1977229
received.JPG
email.JPG

I have a user form with email notification.

for new user registration, I would like to send an email to both the registrar and admin. (this is done) .
I have included some fields value in the email body as you can see in the attached email. But I am receiving the notification without the value. (Please check the attached image).

Also, Every time I update the form, a new registration notification sent.
What is the issue?

#1977349

Hello and thank you for contacting the Toolset support.

Regarding the missing fields in the notification, it is expected, because the notification does not hold the context(the created/edited post). So, you will need to pass it to the shortcodes using the item attribute. https://toolset.com/documentation/user-guides/views-shortcodes/item-attribute/

Instead of:

[types usermeta='civil-id' user_is_author='true'][/types]

Use:

[types usermeta='civil-id' user_is_author='true' item='%%POST_ID%%'][/types]

Note that you can also create your own placeholders. Check this article https://toolset.com/documentation/programmer-reference/forms/how-to-use-custom-placeholders-in-cred-notifications/

I hope this helps. Let me know if you have any questions.

#1977369
11.JPG

Thank you for your reply,

I have tried as your suggestion. But it is still now displaying the value. Check the screenshot.
Note that, This is a user form, not a post form

#1977483

For user forms you need to use %%USER_USERID%% with the user_id argument instead of item argument. You can also drop the user_is_author='true' argument, it is used with posts.

[types usermeta='civil-id' user_id='%%USER_USERID%%'][/types]
#1978015

My issue is resolved now. Thank you!