Tribe__Tickets__Tickets_View::render_rsvp_selector( string $name, string $selected, int $event_id = null, int $ticket_id = null )

Creates the HTML for the Select Element for RSVP options.


Parameters

$name

(string) (Required) The Name of the Field.

$selected

(string) (Required) The Current selected option.

$event_id

(int) (Optional) The Event/Post ID (optional).

Default value: null

$ticket_id

(int) (Optional) The Ticket/RSVP ID (optional).

Default value: null


Top ↑

Return

(void)


Top ↑

Source

File: src/Tribe/Tickets_View.php

	public function render_rsvp_selector( $name, $selected, $event_id = null, $ticket_id = null ) {
		$options = $this->get_rsvp_options();

		?>
		<select <?php echo $this->get_restriction_attr( $event_id, $ticket_id ); ?> name="<?php echo esc_attr( $name ); ?>">
		<?php foreach ( $options as $value => $label ): ?>
			<option <?php selected( $selected, $value ); ?> value="<?php echo esc_attr( $value ); ?>"><?php echo esc_html( $label ); ?></option>
		<?php endforeach; ?>
		</select>
		<?php
	}