Problem:
How to allow users to choose their role in a user registration form?
Solution:
There is no option to include a role selector in such a form, but you can add a generic select field to the form where the role option is chosen, and then use the cred_save_data hook to run some code that updates the role after the form has been submitted and the user created.
An example is given in this linked thread: https://toolset.com/forums/topic/radio-buttons-selection-triggers-assigning-to-one-of-2-user-roles/
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 2 meses.
Asistido por: Nigel.