Skip Navigation

[Gelöst] Trouble Sending Form Notification Using User ID Field

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 6 Jahren, 5 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von aaronM-9 vor 6 Jahren, 5 Monaten.

Assistiert von: Shane.

Author
Artikel
#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

Sprachen: Englisch (English )

Zeitzone: 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