Search Results for 'booking form'
-
Search Results
-
I’ve been doing a lot of looking through the site docs and through the codebase and am having a problems trying to figure out how to add custom field types to the form customizer (and then customizing the output on the front-end).
As the most basic example, we have a custom taxonomy registered to events. We would like people to be able to add a dropdown for the custom taxonomy to their submission forms just like with categories and tags.
I found the
custom-taxonomies.php
file which seems to hook intoeventorganiser_event_form_element_types
and looks like it should already be adding any object taxonomies registered to the event CPT (which I have registered both through theeventorganiser_event_properties
hook and throughregister_taxonomy
‘s second parameter. Tried adjusting the priority on the hook with no luck. Maybe this just isn’t linked up yet?I understand that there already seems to be a well documented API for adding custom fields to the booking form via hooks and element factories. Does this functionality exist for FES in some sort of undocumented state? I’m sure it is something you are working towards but wondering what is available as of now.
P.S. for now, we have been able to use the ability to specify a hook name to render custom fields, but it’s not the most user friendly option! However, it works – so good looks.
Topic: Multi Ticket names in export
Hi you help me set up a plugin so that I could have multi tickets (different names and emails) in one booking.
I.e there would be a ‘book’ they would enter there name and email, then select how many tickets. That would present a drop down with the corresponding amount of tickets where it asks for individual names, email, dietary etc.
However upon exporting it only exports the bookee name and not the individual ticket names. I need the ticket names and not the bookee name.
However I’m not sure how to go about this, it’s getting a bit urgent as our event is on the 15th an we have name cards etc to write out.
I’ve included the custom multi ticket plugin you helped me with originally incase that is needed.
<?php /* Plugin Name: Event Organiser - Multi ticket options Description: Code snippets for my site Version: 1.0 License: GPL Author: Jade Deverill Author URI: url */ function my_attach_attendee_questions( $form ){ $attendee_fields = array( array( 'id' => 'attendee-name', 'type' => 'name', 'required' => true, ), array( 'id' => 'attendee-email', 'type' => 'email', 'required' => true, ), array( 'id' => 'attendee-phone', 'label' => 'Phone', 'type' => 'input', 'required' => true, ), array( 'id' => 'attendee-dietary', 'label' => 'Dietary Requirements', 'type' => 'input', 'required' => true, ), array( 'id' => 'attendee-seating', 'label' => 'Seating Requests or Comments', 'type' => 'input', 'required' => true, ), array( 'id' => 'attendee-babyname', 'label' => 'Angel Baby Name', 'type' => 'input', 'required' => false, ), ); $attendee_questions = $form->get_element( 'attendee-questions' ); if ( ! $attendee_questions ) { $ticketpicker = $form->get_element( 'ticketpicker' ); $position = intval( $ticketpicker->get( 'position' ) ) + 1; $parent = $ticketpicker->get_parent(); $parent = ( $parent ? $parent->id : false ); $attendee_questions = EO_Booking_Form_Element_Factory::create(array( 'id' => 'attendee-questions', 'type' => 'attendee-questions', 'elements' => $attendee_fields, 'ticket_label' => "Ticket: {{{ticketname}}}", )); $form->add_element( $attendee_questions, array( 'at' => $position, 'parent' => $parent ) ); } else { //Attenee questions field already exists, optional: over-ride with our elements $attendee_questions->set( 'elements', $$attendee_fields ); $attendee_questions->_modelElements->set( $attendee_questions->get('elements'), array( 'form' => $form ) ); } } add_action( 'eventorganiser_get_event_booking_form', 'my_attach_attendee_questions', 5 ); add_filter( 'eventorganiser_export_tickets_headers', function( $columns ) { $columns['ticket_first_name'] = 'Ticket Holder (first name)'; $columns['ticket_last_name'] = 'Ticket Holder (last name)'; $columns['ticket_email'] = 'Ticket Holder Email'; $columns['ticket_phone'] = 'Ticket Holder Phone Number'; $columns['ticket_dietary'] = 'Ticket Holder Dietary Requirements'; $columns['ticket_seating'] = 'Ticket Holder Seating Requests or Comments'; $columns['ticket_babyname'] = 'Angel Baby Name'; return $columns; } ); add_filter( 'eventorganiser_export_tickets_cell', function( $cell, $column, $ticket ) { switch( $column ){ case 'ticket_first_name': $name = eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-name' ); //_eo_booking_meta_{field id} if ( $name ) { return $name[0]; //$name is an array: array( 'first name', 'last name' ); } return ''; break; case 'ticket_last_name': $name = eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-name' ); //_eo_booking_meta_{field id} if ( $name ) { return $name[1]; //$name is an array: array( 'first name', 'last name' ); } return ''; break; case 'ticket_email': return eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-email', true ); //_eo_booking_meta_{field id} break; case 'ticket_phone': return eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-phone', true ); //_eo_booking_meta_{field id} break; case 'ticket_dietary': return eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-dietary', true ); //_eo_booking_meta_{field id} break; case 'ticket_seating': return eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-seating', true ); //_eo_booking_meta_{field id} break; case 'ticket_babyname': return eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-babyname', true ); //_eo_booking_meta_{field id} break; default: return $cell; } }, 10, 3 ); /** * Add a column for displaying booking ticket meta */ add_filter( 'eventorganiser_booking_tickets_table', function( $columns ){ list($value, $key) = array(end($columns), key($columns)); unset($columns[$key]); $columns['name'] = 'Ticket owner'; $columns['email'] = 'Email'; $columns['phone'] = 'Phone'; $columns['dietary'] = 'Dietary'; $columns['seating'] = 'Seating'; $columns['babyname'] = 'Baby Name'; $columns[$key] = $value; return $columns; }); /** * Display booking ticket meta */ add_action( 'eventorganiser_booking_tickets_table_column', function( $column_name, $ticket ){ if( 'name' == $column_name ){ $name = (array) eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-name' ); echo esc_html( implode( ' ', $name ) ); } elseif( 'email' == $column_name ) { echo esc_html( eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-email', true ) ); } elseif( 'phone' == $column_name ) { echo esc_html( eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-phone', true ) ); } elseif( 'dietary' == $column_name ) { echo esc_html( eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-dietary', true ) ); } elseif( 'seating' == $column_name ) { echo esc_html( eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-seating', true ) ); } elseif( 'babyname' == $column_name ) { echo esc_html( eo_get_booking_ticket_meta( $ticket->booking_ticket_id, '_eo_booking_meta_attendee-babyname', true ) ); } },10,2);
I want to be able to collect the first name and last name on the booking form.
By default the first name and last name are hidden when a user is already logged in. However, we have many users for whom we don’t have the first name and last name fields.
How can I make first and last name required fields on event booking forms?
Thanks
Dan
Hi,
I have a questions regarding ‘Bookings are no longer available for this event.’
I get this message, but there is no single booking and tickets are available.Screenshot attached: http://imgur.com/a/qztcJ
I’m a bit confused, how can I debug this?
This is my local install, I’m a developer, and I’m using:<?= eo_get_booking_form($post_id); ?>
Inside my custom template.
Thanks in advanced
Hi, my client’s customer is unable to change his card used for Stripe payment. He says it is rejecting the new one and reverting to his old saved card.
Could this be due to the new card type being unsupported, or another reason (apart from invalid details)?
And how would a customer normally change their card details? Simply enter a new one into the booking form?
Thanks,
Jon
<p>The
- default blobs on the radio buttons look confusing to me (see above).<br>I’ve tried adding “list-style-type: none;” to the “.eo-booking-form-element-radio ul” selector in my child theme’s style.css file, but to no avail.
Topic: Items not displaying now
Under “Events” I’m missing Bookings and Venues. Also it is no longer displaying the Booking Form or the checkout on the Event page.