Events Made Easy Forums How do I … Place a checkbox above submit button, change button text if checkbox is changed

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #54997
    Anonymous
    Inactive

    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!

    #54999
    Franky
    Keymaster

    That can only be achieved via jquery code.

    #55022
    Anonymous
    Inactive

    Yep, I know.
    My problem is to find the exact place, where to write the code (the placement of the submit button).

    #55023
    Franky
    Keymaster

    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

    #55236
    Anonymous
    Inactive

    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.

    #55237
    Franky
    Keymaster

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top