Skip Navigation

[Resolved] Notifcation to Fields included in Forms

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

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)

This topic contains 6 replies, has 2 voices.

Last updated by jacoP 2 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2264651
Toolset Notifications Issue.png

Tell us what you are trying to do?

Hi there,

I'm trying to set up notifications to fields that are included in my form. For example, when submitting the form, I am fetching the Id of the author of the post against which - the offer in this case - is made. I would then like to send the author an email notifying them of this action. I've tried adding a variety of fields to my forms but for some reasons these do not appear as options in the select options below option 3 (Send notification to an email specified in an email field included in the form) or option 4 (Send notification to a WordPress user with an ID coming from a generic field in the form:).

What am I missing?

Is there any documentation that you are following?

I have consulted the available documentation without any luck.

Is there a similar example that we can see?

I can arrange access if necessary.

What is the link to your site?

hidden link

#2265215
user-id1.jpg

Hello,

How do you setup the field "Id of the author"?

It needs to be setup as a generic field, and use parameter "generic_type":"user_id", for example:

[cred_generic_field type='select' field='user-id']
{
"required":0,
"default":"0",
"options":[{"value":"1","label":"admin"},{"value":"0","label":"guest"}],
"generic_type":"user_id",
"persist":1
}
[/cred_generic_field]

See my screenshot: user-id1.JPG

#2265307

Thank you Luo.

I'm not in need of a select field with values. The author is one individual identified by a user id through a shortcode that I've added. I'm not looking to generate a select list of options in the form.

I simply need to be able to capture the user id from the shortcode into a generic cred field to enable the notification to be send the post author where the form is submitted from (not the custom post author submitting the form).

Maybe this option could work - "Send notification to an email specified in an email field included in the form:" but the same options as listed in your screenshot is not available on the generic email field ie. 'This field value is a [a]vailable in notification settings ?

#2265329

As a workaround, you can setup the generic select field with only one option, the option value is current post author's ID, for example:

[cred_generic_field type='select' field='user-id']
{
"required":0,
"default":["[wpv-post-author meta='ID' item='$current_page' format='meta']"],
"options":[{"value":"[wpv-post-author meta='ID' item='$current_page' format='meta']","label":"[wpv-post-author meta='user_email' item='$current_page' format='nickname']"}],
"generic_type":"user_id",
"persist":1
}
[/cred_generic_field]

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-author

#2265341

Thank you Luo.

I've just discovered another way - using the hidden field type generic field combined with my shortcode.

I will also test your solution, thank you.

#2266123

OK, please update here if you still need assistance for it, thanks

#2268135

My issue is resolved now. Thank you!