Change user role with script
-
Hi all, I am out of my depth but with something simple (I hope) and wondered if the forum could help.
I am using WordPress and contact form 7 and I use Redirection for Contact Form 7 plugin which manages what happens after the form is filled in.
It has a space for JavaScript to be run when the form is sent.
I am making a form to update a user role if they fill out the form, and this form is only available if they are already logged in. so I thought the easiest way would be to use java script to:
change current (logged in) user role to new role
or even simpler
let role (of logged in user) = new role
I don’t know JavaScript at all, but I thought I could google it and piece it together, but like all things there are pages and pages about the keyword and not my specific problem topic, so much that I haven’t even been able to get even a few bits of code to try and put it together…
Any help would be appreciated!!, even just somewhere to see clearly how to use JavaScript and user roles with WordPress, so i can learn how to do it myself.
- The topic ‘Change user role with script’ is closed to new replies.