
Stephen Harris
Hi Francois,
The field elements are all templated so you could replace the mark-up entirely (you would want to ensure the name of the fields are the same). Just take a look in event-organiser-pro/templates/booking-form
and copy any of the templates to your theme to edit them.
You may be able to achieve this with just CSS, but the ability to modify the mark-up of the page is also there if you need.
As for exactly how you would achieve that (in terms of what CSS statements to write) – that would depend on the theme really, so I can’t provide any concrete suggestions. As far as the plug-in is concerned (and in terms of mark-up) the name fields and e-mail field are two separate elements – so you could try setting the width appropriately so they fit on one line.

Francois Wessels
Hi Stephen,
I hope it would be possible for you to assist with this — would it be possible to have the fields for e-mail, name & surname located next to another as per the supplied screenshoyt
http://glui.me/?i=ktw8knx2ab30jzr/2015-09-01_at_15.49.png/
We are using the Clinto theme on http://staging3.andrekocklimpopo.co.za & only the simplified booking form as a RSVP.
Any help will be greatly appreciated.
Kind regards
Francois Wessels

Stephen Harris
Benoit,
I think I’ve identified the problem. I hadn’t noticed this for some reason at first, but the View class is not loaded on admin pages:
if ( ! is_admin() ) {
require_once( EVENT_ORGANISER_PRO_DIR . 'includes/form-customiser/class-eo-booking-form-element-view.php' );
}
If you replace that (in event-organiser-pro.php
) with simply
require_once( EVENT_ORGANISER_PRO_DIR . 'includes/form-customiser/class-eo-booking-form-element-view.php' );
Then it should work.
I think really I ought to be using auto-loading here, which I will do for the 1.11.0 release.

Stephen Harris
Hi Benoit,
The error suggests that is EO_Booking_Form_Element_View
is not defined – which leads me to think you have a corrupted install. Assuming you have 1.10.*:
-
Double check the event-organiser-pro.php
file has the line:
require_once( EVENT_ORGANISER_PRO_DIR . 'includes/form-customiser/class-eo-booking-form-view.php' );
-
That the file includes/form-customiser/class-eo-booking-form-view.php
contains EO_Booking_Form_Element_View
That said, I’m concerned that those classes are being called at all – they are used for the front-end display of the fields only – so another plug-in/theme must be doing something to invoke them.

Benoit David
Hi,
I also reported this issue at:
https://github.com/stephenharris/Event-Organiser/issues/289
When I save an event, this has happened a few times now (not every time I save):
I work on an event, and when saving, i loose my ability to see all the information about the page (can’t use Visual Composer nor Visual view, just TEXT, and th following message appears on the right side of the screen:
Fatal error: Class ‘EO_Booking_Form_Element_View’ not found in /home/katalyst/public_html/wp/wp-content/plugins/event-organiser-pro/includes/form-customiser/class-eo-booking-form-elements-view.php on line 56
PLEASE HELP!!!!!



Willow
Re: 1) Happy to hear there’s a solution for correcting the terminology, yay.
Re: 2) When clicking “Download bookings”, “Payment gateway” showed up in the dropdown along with my custom fields, like this:

It self-corrected when I removed the title from the “Payment Gateway” field in the form designer.
It no longer shows up in the custom fields list.
Moving along 🙂
Thank you again!!

Stephen Harris
Yes, first of all you can disable the appending of the booking form to the event content:
add_filter( 'eventorganiser_pro_get_option_disable_automatic_form', '__return_true' );
and then to display the booking form in your template use:
echo eo_get_booking_form( get_the_ID() );
The ID being passed to eo_get_booking_form()
should be the event ID, in the above I’m assuming that your using it in the single event template.

Willow
Got it, thanks.
Is there way to place the booking form in a specific place within the template?

Willow
Hello Stephen,
I’ve looked in the docs and forums, but can’t find answers to these questions:
1) Is it possible to create a single ticket for all events, or do the tickets have to be added to each event separately?
2) For the life of me, can’t figure out how to include the booking form automatically on all events in the template.
Thank you!

Stephen Harris
Hi David,
The above advice is outdated – and you’re right – this is over-ridden by the javascript. There’s no API exposed for modifying the ticket quantity, however, you can do the following:
add_action( 'eventorganiser_get_event_booking_form', function( $form_id, $event_id ){
$tickets = eo_get_event_tickets_on_sale( $event_id );
if( isset( $_POST['eventorganiser']['booking']['tickets'] ) ) {
return;
}
$_POST['eventorganiser']['booking']['tickets'] = array();
foreach ( $tickets as $tt_id => $ticket ) {
//Set default quantity below
$_POST['eventorganiser']['booking']['tickets'][$tt_id] = 1;
}
}, 10, 2 );
Simply add that to a utilty plug-in or theme’s functions.php

Benoit David
Hi Stephen,
I got it to work in the event meta. thank you.
What about in the booking form? I managed to put it right before the Ticket Picker table, but I’d like to append the quantity to the 3rd column (Quantity).
I think I found the place in eo-ticket-picker.php: the table seems to be create din lines 63 to 80.
…
<tr id=”eo-booking-ticket-<?php echo $ticket_id;?>” style=”border-top:none”
class=”eo-booking-ticket-row <?php echo $class;?>”
<?php eo_booking_form_ticket_data_attr( $ticket); //Add ticket data attributes – required for JS ?>
>
<td class="eo-booking-ticket-name"> <?php echo esc_html( $ticket['name'] ); ?> </td>
<td class="eo-booking-ticket-price"> <?php echo eo_format_price( $ticket['price'], true ); ?> </td>
<td class="eo-booking-ticket-qty">
<?php $value = ( isset( $input['tickets'][$ticket_id] ) ? $input['tickets'][$ticket_id] : 0 ); ?>
<input type="number"
class="<?php echo esc_attr( $this->element->get_class() );?>"
data-eo-ticket-qty="<?php echo esc_attr( $ticket_id );?>"
name="eventorganiser[booking][tickets][<?php echo esc_attr( $ticket_id );?>]"
max="<?php echo $spaces; ?>" style="width:auto;"
min="0"
value="<?php echo esc_attr( $value );?>" />
</td>
</tr>
I tried to add it, but it breaks the table.
The title of the column would become “Quantity/Available” in English and “Quantité/Disponible(s)” in French.
In each row, the info would be added right after the quantity box, like “/”+ number of tickets left.
I made a mockup of it: http://www.screencast.com/t/neGO8jLsF
Is that possible for you to modify the code for me?
Thank you so much!
Benoit

Benoit David
Please disregard the question below – Just figured out. It’s the Simple Booking Mode option in the Booking Forms Editor.
<hr />
I noticed something else that’s weird. I had put a test ticket of $1 to test my gateways, and after I removed it, the number of ticket selection is gone!
How can I put it back?
Thanks!
-
This reply was modified 10 years ago by
Benoit David.

Stephen Harris
Hi Benoit,
Are you booking by date or by series? If ‘by date’ then remove the eo_get_the_occurrence_id()
below:
In the event-organiser/templates/single-meta-event-single.php
you’ll see:
<li> <?php eo_the_start($date_format) ?></li>
you can replace that with:
<?php
printf(
'<li> %s (Tickets remaining: %d)</li>',
eo_get_the_start( $date_format ),
eo_get_remaining_tickets_count( get_the_ID(), eo_get_the_occurrence_id() )
);
?>
-
This reply was modified 10 years ago by
Stephen Harris.

Benoit David
Hi,
I am not familiar enough with php to figure this out on my own (http://codex.wp-event-organiser.com/function-eo_get_remaining_tickets_count.html).
One of my events is:
http://katalyst5.com/wp/learn/en/events/event/maximize-your-linkedin-3hrs/
I want to display the remaining ticket count for each single event in two locations:
- As a first bullet in the event Details;
- In the booking form, next to the Quantity picker.
Can you help me?
Thank you!
Benoit

Benoit David
Hi,
I’m trying to replace the default form (which i removed successfully with your code in functions.php).
But simply putting [event_booking_form] does nothing.
I’d like to try to specify the event_id, but dont know where to find it.
The page is at : http://katalyst5.com/wp/learn/fr/events/event/maximize-your-linkedin-4hrs/?preview=true&preview_id=100&preview_nonce=8bb6f67c5f
Thank you!