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