Site icon Hip-Hop Website Design and Development

Updating custom user meta

I have created a new custom meta for my wordpress users. These are just 2 radio buttons (either ‘Yes’ or ‘No’).

I have created a button on the front end and want it so that if the button is clicked, the value changes ‘True’. By default it will be set to the value of ‘No’, and i wont have to worry about the button being clicked again as i am hiding the button once the value is set to ‘True’.

Iv found a few ways where i can display a form with a submit button, but is this possible with just just one button, like below:

<button id="updateMyUserMeta" name="updateMyUserMeta">Update</button>