Skip Navigation

[Resuelto] Trouble Sending Form Notification Using User ID Field

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 5 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por aaronM-9 hace 6 años, 5 meses.

Asistido por: Shane.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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