Tell us what you are trying to do?
Hello, first of all im sorry about my english.
I am creating a project in which: 1- a visitor fills out the User registration form. 2- The moderator confirms the data and assigns the Student role from the dashboard. 3- At that moment a custom function is executed, which passes the user data to the dedicated cpt.
4- If a user with the Student role is modified from the dashboard side, the second custom function is activated which updates the fields of the CPT Student.
Until here, all good.
THE PROBLEM:
If a user with the Student role edits his user profile from the frontend with the toolset form, obviously he only updates the user data.
QUESTION: Is it possible, in some way, that I also update the fields of the Student CPT?
Is there any documentation that you are following?
no
Is there a similar example that we can see?
no
What is the link to your site?
is a test subfolder. If you require it, I could share the link.
Hi Sergio,
Thank you for the getting in touch.
Actually yes this is possible, that same function that you're using on the backend can also be adapted to the frontend with the following hook.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
The hook above triggers when a form is submitted on the frontend so you should be able to use this to update the student's profile as well.
Thanks,
Shane
My issue is resolved now. Thank you!