Skip Navigation

[Résolu] Trouble Sending Form Notification Using User ID Field

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The issue here is that the user's Toolset Forms generic fields are not saving to the database.

Solution:

In order for the items to be saved to the database then you must add the "persist":1, attribute.

Thanks,
Shane

This support ticket is created Il y a 5 années et 11 mois. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 réponses, has 2 voix.

Last updated by aaronM-9 Il y a 5 années et 11 mois.

Assisted by: Shane.

Auteur
Publications
#907946

I'm trying to have a form send a notification to a user ID based on a field in the form. I have tried following the directions below to add a generic field:

https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/

I've tried his using a generic hidden field (my preference) and a generic select field, using the following code:


[cred_generic_field field='recipientid' type='select' class='' urlparam='recipient']
{
"generic_type" : "user_id",
"required":1,
"validate_format":0,
"default":[],
"options":[
{"value":"","label":""}
]
}
[/cred_generic_field]

[cred_generic_field field='recipient_user_id' type='hidden' class='' urlparam='recipientid']
{
"generic_type" : "user_id",
"required":1,
"validate_format":0,
"default":""
}
[/cred_generic_field]

However, the field does not come up under the "Send notification to a WordPress user specified in a form field" drop-down (there are no options on the list).

Am I doing something wrong here? The instructions above say that the key line is the generic_type = user_id line, which I have added.

- Aaron

#908419

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Aaron,

Thank you for contacting our support forum.

Could you try adding "persist":1, to the generic shortcode and let me know if they start showing up in the notifications.

Thanks,
Shane

#908521

Hi Shane,

That did the trick. I actually almost included that but decided not to because I wasn't sure what it was there for and the instructions very specifically said the key is to put in the generic_type: user_id line. Perhaps your instructions could be updated to specify that the other line is also required so that other users aren't confused.

Appreciate the clarification.

- Aaron

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