• Resolved Anonymous User 16004409

    (@anonymized-16004409)


    Hi! Is it possible to force bookings for every single event with a predefined Ticket?

    If not, my thought is to create a PHP Script, which enables the booking form for every event by sql. Has somebody tips for doing that? For example the tables I have to edit via sql?

    Thank you,
    Timon

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Timon,

    Just to clarify: do you want to set a default ticket for admin users when creating an event or do you want to make sure every booking includes a specific ticket? Thanks.

    Thread Starter Anonymous User 16004409

    (@anonymized-16004409)

    Hi!

    I want to make sure, every event includes a (predefined) ticket.

    Regards,
    Timon

    In that case, adding a code snippet along the lines of the one below to the functions.php file of your theme will do the trick:

    https://pastebin.com/UqUU6uzZ

    Thread Starter Anonymous User 16004409

    (@anonymized-16004409)

    Thank you for the fast support.

    This snippet works perfectly for setting the standard ticket. Is there a possibility to force bookings for every event, without have to activate it during event creation?

    There’s no setting for that and I couldn’t find any code in our library that would help.

    That said, it ought to be possible to use a bit of Javascript / jQuery on the page load to auto select that option. Something like this:

    https://stackoverflow.com/questions/30509108/jquery-checkbox-checked-when-page-loads

    Thread Starter Anonymous User 16004409

    (@anonymized-16004409)

    Thank you for your tip!

    I’ve added these lines of code via a Javascript Add-on:

    <script type="text/javascript">
    jQuery(document).ready(function($ ){
      
      	$('#event-rsvp').prop('checked', true);
      
    });
    </script>

    After that, I’ve hidden the checkbox and the headline via css, using
    visibility: hidden !important;

    Thank you for your help!

    Regards,
    Timon

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Force booking for every event’ is closed to new replies.