- This topic has 5 replies, 2 voices, and was last updated 8 years, 10 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Place a checkbox above submit button, change button text if checkbox is changed
Hi again…
I’d like to place a checkbox above the submit button when someone want to register for an event.
This checkbox should always appear, on every single event.
When I check the checkbox, the value of the submit button should change.
I didn’t find the right place to implement this, I thought it could be the eme_formfields.php, but I don’t find a solution.
Can someone please help me? Thanks!
That can only be achieved via jquery code.
Yep, I know.
My problem is to find the exact place, where to write the code (the placement of the submit button).
Don’t change the code, but add your own code to either your theme function.php file or in the EME settings, tab “extra”, the “headers” setting
Also, take a look at the eme filter eme_add_booking_form_filter
I think I’m at a loss…
I really don’t get how to implement the jquery-code to dynamically change the text text of the submit button.
If I use the option to write the code in the headers setting it always appears at the top of the site, I can’t place it inside the booking form.
The checkbox itself can be accomplished by creating a new formfield of type “checkbox”, see the doc on custom form fields:
http://www.e-dynamics.be/wordpress/?cat=44
After that it is just a small jquery to check the value of the checkbox. For a jquery example, see e.g. js/eme_admin_events.js, search for
jQuery('input#rsvp-checkbox').change(updateShowHideRsvp);
The jquery part needs to be in the EME settings, tab “extra”, the “headers” setting