Support » Plugin: Events Manager » [Plugin: Events Manager] Added drop-down to booking form-how to get value into email

  • Resolved babyatom


    (I’ve been using WordPress for years and there’s ALWAYS stuff that I get totally, totally stuck on!)

    I’ve added a ‘select a location’ drop-down to the event booking form (edited templates/forms/bookingform/booking-fields.php) and simply want whatever is selected to come through in the booking email.

    This is what I’ve done…
    Added the drop-down ‘Select a location’ to the booking form:
    <label for=’Select a location’><?php _e(‘Select a location’, ‘dbem’) ?></label>
    <select name=”select”><?php echo !empty($_POST[‘select_location’]) ? $_POST[‘select_location’]:” ?>
    <option value=”Le Dorat”>Le Dorat</option>
    <option value=”St Leger Magnezeix”>St Leger Magnezeix</option>
    <option value=”Bellac”>Bellac</option>
    <option value=”Ruffec”>Ruffec</option>

    Added this to em-booking.php:
    case ‘#_SELECTLOCATION’:
    $replace = $this->select_location;

    Then added #_SELECTLOCATION to my email template in WP admin.

    I’ve no idea what I’m doing but I can usually muddle through. I did read the docs but I don’t think I understood them. So this time, as I said at the top, I’m stuck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • you’d have to save them somewhere like in the em_meta table or in the booking_meta field of the booking table (stored as a serialized array, so add to it, don’t replace it) and bring it up elsewhere. If you read the tutorials, you could quite easily add extra fields etc. – slightly different walkthrough, but similar concept

    Also, EM Pro already has this feature.

    Plugin Author Marcus


    NetWebLogic Support

    if you store anything into the $EM_Booking->booking_meta array during the em_event_get_post_meta filter, it’ll get saved into the array, and you can access it later in other situations

    Damn, still don’t get it 🙁 Thanks anyway you two; I’m just not that smart.

    Because I’m a bodger I’ve cheated and hijacked the ‘phone number’ field, replacing it with my drop-down. It works, which will do me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Events Manager] Added drop-down to booking form-how to get value into email’ is closed to new replies.