Add selections from booking form in confirmation e-mail

WordPress Event Management, Calendars & Registration Forums General Question Add selections from booking form in confirmation e-mail

This topic contains 3 replies, has 3 voices, and was last updated by  Stephen Harris 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6911

    Is there a way to display the selections that a user made on the booking form in the confirmation e-mail?

    Erica Eide
    #6913

    Not currently I’m afraid. But it is on the roadmap (1.5 maybe). Because there are multiple booking forms there will need to be a way of identifying fields on different forms to ‘mean’ the same thing. E.g. you may want a contact phone number, and you’ll add this field to all your booking forms. In the email you’ll want a tag to represent that field in each of the forms, so that the entered phone number can be displayed, regardless of which form they actually used.

    Stephen Harris
    #8248

    We have the same need. In our case bookes can choose from some option when they want to arrive and leave.
    The point is: Most of the bookes forget which option they choosed on the website. They want to look the information up and check their emails but the information is missing so they call us and complain! We have to look the information up for them in the wordpress backend.

    I do understand that it is complicated to choose selections from the booking form but is it possible to add the whole booking form information to the confirmation email?

    In terms of adding selections, my suggestion would be to add a shortcode for each selection. Set up a custom field “Shortcode_Name” where users can add an ID for the shortcode so they can use it in the emails form.

    Jan Wildefeld
    #8279

    Hi Jan,

    Since this probably won’t be in 1.6 rather than 1.5, here’s the code for achieving this:

    add_filter( 'eventorganiser_email_template_tags', 'my_booking_meta_email_tag', 10, 3 );
    function my_booking_meta_email_tag( $parsed_message, $booking_id, $original_message ){
       //$parsed_message Email body with tags parsed
       //$booking_id The booking ID
       //$original_message Email body without tags parsed
    
       $custom_field_id = 5; //ID of the field whose data you want to show
    
       $parsed_message = str_replace( 
              '%arrive_time%', 
              eo_get_booking_meta( $booking_id, $custom_field_id, true ), 
              $parsed_message
       );
    
       return $message;
    }

    With regards to multiple booking forms – your suggestion of using an admin-given ‘label’ is probably the most likely route for 1.6. This will mean an extra option added to each field in the form customiser where you can specify a label (which should be unique within the form, but can be used in multiple times across all forms). This label determines which field is used for the data.

    A tag for listig an entire form submission shall be in 1.5.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.