Posted: April 24, 2015 at 10:06 am
|
Hi there, I’m trying to have a pre-checked checkbox in the checkout page. I know using jquery I can use the following:
But I’m just not sure in what file and where to put it in. Please advise. Thank you. |
|
Hi there, I’m trying to have a pre-checked checkbox in the checkout page. I know using jquery I can use the following:
But I’m just not sure in what file and where to put it in. Please advise. Thank you. |
|
Hi, Personally I would add it to a site specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/), something like:
Which will add the script to the footer area. |
|
Thank you. |
|
It works when using Cart or Registering only one Attendee. When I use “Add more attendees” option the checkbox stays unchecked. Code used:
|
Hi, this doesn’t work as expected because those additional fields are activated as you add additional attendees by clicking on the button. The jQuery runs on the initial page load so it won’t be able to pick those up afterwards. — |
|
|
Would I be able to run the script every time the button clicked? What file can I fin that in? Thank you Lorenzo. You are and have been a huge help! |
Hi, that would not work as expected since the sample jQuery that was shared is set to run on the initial page load. — |
|
The support post ‘Pre-checked checkbox in the checkout’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.