Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I need to do the exact same thing but unable to find what you’re talking about.

    Looking in the bookingform, I see this:

    <form id='em-booking-form' class="em-booking-form" name='booking-form' method='post' action='<?php echo apply_filters('em_booking_form_action_url',$_SERVER['REQUEST_URI']); ?>#em-booking'>
    
    			 	<input type='hidden' name='action' value='booking_add'/>
    
    			 	<input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
    
    			 	<input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_add'); ?>'/>
    
    				<?php 
    
    					// Tickets Form
    
    					if( ($can_book || get_option('dbem_bookings_tickets_show_loggedout')) && (count($EM_Tickets->tickets) > 1 || get_option('dbem_bookings_tickets_single_form')) ){ //show if more than 1 ticket, or if in forced ticket list view mode
    
    						do_action('em_booking_form_before_tickets', $EM_Event); //do not delete
    
    						//Show multiple tickets form to user, or single ticket list if settings enable this
    
    						//If logged out, can be allowed to see this in settings witout the register form 
    
    						em_locate_template('forms/bookingform/tickets-list.php',true, array('EM_Event'=>$EM_Event));
    
    						do_action('em_booking_form_after_tickets', $EM_Event); //do not delete
    
    					}
    
    				?>

    I have 4 ticket types but only want people to be able to take one type. The radio button is acceptable as a workaround but I can’t figure out how to do that in this code ??

    Thread Starter l8knight

    (@l8knight)

    Thank you! You are a rock star!

    I ended up just using the 2nd one, replacing the Attendeeslist.php content with that code and commenting out the parts I didn’t want. Worked beautifully. I need to get my head back into object oriented programming, still do all my php the old fashioned way ??

    Thanks again, so happy this is working as intended now!

    I am also trying to update the list. I want to show:

    DisplayName Ticket_Name Booking_Comment

    Right now I can get the comment, the person’s real name is shown instead of display name.

    My code:

    <?php
    
    /* @var $EM_Event EM_Event */
    
    $people = array();
    
    $EM_Bookings = $EM_Event->get_bookings();
    
    if( count($EM_Bookings->bookings) > 0 ){
    
    	?>
    
    	<table cellpadding="0" cellspacing="0" class="rsvp-comment-table" ><thead><tr><th class="rsvp-name" width="150">Name</th><th class="rsvp-comment" width="*">Role</th><th class="rsvp-comment" width="*">Comment</th></tr></thead><tbody>
    
    	<?php
    
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    
    	foreach( $EM_Bookings as $EM_Booking){
    
    		if($EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
    
    			$people[] = $EM_Booking->get_person()->ID;
    
    			echo '<tr><td>'. $EM_Booking->get_person()->get_name() .' </td><td> ' . $EM_Booking->ticket_name. ' </td><td> ' . $EM_Booking->booking_comment. ' </td></tr>';
    
    		}elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    
    			echo '<tr><td>'. $EM_Booking->get_person()->get_name() .'</li>';
    
    		}
    
    	}
    
    	?>
    
    	</tbody></table>
    
    	<?php
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)