jeudi 15 juillet 2021

Tick checkbox if page is visited via button

Looking for some help figuring out how I could add the following functionality:

I've got a contact page on my WP website which has a contact 7 form and a checkbox to Sign Up for the newsletter.

The contact page is accessible in 2 ways - obviously via the menu, but there is also a "Sign Me Up for the newsletter" button on homepage which when clicked currently takes the user to the contact page too. I would like to make it so that when user clicks the button on the homepage, it not only takes him/her to the contact page but also automatically ticks the checkbox that's on there. I do not want the checkbox to be ticked automatically if the user visits the contact page via the menu or any other means.

I guess I'm looking for some php logic, but any thoughts are appreciated.




Aucun commentaire:

Enregistrer un commentaire