Hi, Is there a way to stop the total being lost when the validation is triggered? Not sure if this problem is just occuring for me.
The inputs retain there value but the total does not calculate – if you add more tickets to the inputs it will ignore the ones already set and total the new ones added.
Please investigate.
Thanks
-
This topic was modified 9 years, 8 months ago by
Alex Steer.

Alex Steer
Hi Alex,
Sorry that the plug-in isn’t working for you. Can you outline the steps to reproduce this problem, it’s not one I’ve seen before.
Thanks,
Stephen

Stephen Harris
Hi Stephen.
Im sure you will have the answer!
- User selects tickets generating total
- User completes form and submits but has created a validation error – (server side val not browser)
(non selection of payment gateway – causing the validation error)
- Page refreshes showing error notices and total is lost – inputs still have values but do not add to total.
Please let me know if that is not clear.
-
This reply was modified 9 years, 8 months ago by
Alex Steer.

Alex Steer
Is there a way to select a gateway as default?

Alex Steer
Great, thanks! It seems that updating the ticket value triggers the display of the total (and correctly), so a simple fix is just to refresh the views once the models have been set up. I’ve checked the latest development branch and this problem doesn’t occur, so I’ll release a patch in the next day or so to fix this until the next minor release (1.11.0).
Re. pre-selecting gateways:
add_action( 'eventorganiser_get_event_booking_form', 'my_prefill_booking_form' );
function my_prefill_booking_form( $form ){
$gateway = $form->get_element( 'gateway' );
if( !$gateway->get_value() ){
$gateway->set_value( 'stripe' );
}
}

Stephen Harris

Alex Steer
That’s correct.
Just so you know, the forum uses markdown. To display code you can write it ‘as is’, then highlight it and select the code icon ({}
)

Stephen Harris
Ok, my bad. Sorry.
I will use that next time.
Thanks

Alex Steer