Support » Plugin: The Events Calendar » Restrict RSVP to 1

  • Resolved lvgreay

    (@lvgreay)


    Hello,
    I want to restrict the RSVP number by one (one attendee can only rsvp one person).
    I used this code from @sandwebdesign in functions.php but it’s not working. Nothing is changes and no error:

    add_action( ‘wp_footer’, ‘tribe_limit_rsvps_to_one’ );

    function tribe_limit_rsvps_to_one() {
    wp_enqueue_script( ‘jquery’ );
    ?>
    <script>
    jQuery(document).ready(function($){
    if ( $(‘.tribe-events-tickets’ ).length ) {
    var $input = $(‘.tribe-events-tickets’ ).find( ‘input.tribe-ticket-quantity’ );
    $input.attr( ‘type’, ‘text’ );
    $input.attr( ‘max’, ‘1’ );
    $input.val( ‘1’ );
    //don’t show quantity field
    $(“.tribe-ticket.quantity”).css(“display”, “none”);
    //always display input fields input
    $(“.tribe-tickets-meta-row”).css(“display”, “block”);
    //don’t show selectbox, I’ll come / don’t come
    $(“.tribe-tickets-order_status-row”).css(“display”, “none”);
    }
    });
    </script>
    <?php
    }

    Can you point me where to add it? and do I have to do some changes?
    Thank you in advance

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restrict RSVP to 1’ is closed to new replies.