Extensions

Search Extensions

Event Tickets Additional Fields

👋 This extension is only compatible with the classic WordPress editor. The block editor is unsupported.

This extension lets you add fields to the ticket form when creating new tickets. Here’s what we mean:

The Zoom and YouTube fields are examples created with the extension, but any number of other fields could be created as well.

Why would you need this? Let’s say you want to show a link to the event’s video stream. This will let you add it on any page. Same deal with embedding videos. Or other downloads. Or instructions for the event. All it takes is adding a shortcode on any page or post:

[tribe_tickets_additional_field]

What makes this extension even more useful is combining it with Event Tickets Plus. Together, custom fields can be added to tickets, then displayed as “protected” content using a [tribe_tickets] shortcode. That way, you can selectively show content to users based on whether they have purchased tickets, RSVP’d for an event or registered for a certain event, among many other possibilities.

Video walkthrough

How it works

First, let’s download and install both this extension and the Event Tickets Plus. They are both required to make this work.

While this extension displays additional fields in the ticket editor, those fields have to actually be defined somewhere. That requires adding a snippet to the theme’s functions.php file. Yes, that means touching a bit of code, but we’ll walk you through it.

Here’s an example:

add_filter( 'tribe_ext_tickets_additional_fields', 'custom_tickets_additional_fields' );

function custom_tickets_additional_fields( $ticket_fields ) {

  $ticket_fields['zoom_link'] = [
    'type'        => 'url',
    'label'       => esc_html__( 'Zoom link' ),
    'description' => esc_html__( 'Insert the Zoom link.' ),
];

$ticket_fields['youtube_embed'] = [
    'type'        => 'textarea',
    'label'       => esc_html__( 'YouTube embed' ),
    'description' => esc_html__( 'Embed code of recorded webinar.' ),
];

return $ticket_fields;
}

Here’s what happening in there:

  • First, we’re hooking into the tribe_ext_tickets_additional_fields function. Huh? That’s just fancy talk saying we’re going to intercept the data for ticket fields and pass in our own data before it runs.
  • Then we’re defining our custom fields inside a function that will pass those fields into the tribe_ext_tickets_additional_fields function before it runs.
  • Specifically, we’ve added two custom fields, one text to enter a link that goes to a Zoom video meeting and a textarea to enter an embedded YouTube video of that recorded meeting.
  • Each custom field is defined by a type (e.g. “url” for the Zoom link), a label (to name the field in the ticket editor) and a description (to provide instructions for that field).

Again, the two fields here are purely examples. You can define different ones depending on what content you need to make available. Text, URL, email and textareas are the only supported form field types at the moment.

Once we save the functions.php file, we should see those fields when adding a new ticket in the classic WordPress editor.

Adding fields to a page

Now comes the fun part. Let’s add the content from those fields to a page. Assuming we’ve already created a new event with a ticket and added content in the custom ticket fields, we can create a new page, then drop in this shortcode:

[tribe_tickets_additional_field ticket_id="2405" field="youtube_embed"]

You’re probably wondering where that ticket ID comes from. It’s located in the “Advanced” tab of the ticket editor which is right above the “Additional Fields” tab where the custom fields are located.

Save the page and — whaaaaa???? — the YouTube video we embedded is on the page!

Showing the fields to certain users

We teased you earlier with a note that it’s possible to use this shortcode with another one that’s available in the Event Tickets Shortcodes extension. Specifically, we can show our custom fields to users based on whether they have registered for a certain event or purchased a certain ticket… or both!

[tribe_tickets_protected_content post_id="123" ticket_ids="2504"]
If you are reading this, that means you purchased Ticket ID 2504 for my event with ID 123.
[/tribe_tickets_protected_content]

Combining the two shortcodes together:

[tribe_tickets_protected_content post_id="123" ticket_ids="2504"]
[tribe_tickets_additional_field ticket_id="2405" field="youtube_embed"]
[/tribe_tickets_protected_content]

Now the only people who can see the embedded video are folks who are logged into your site and have purchased a ticket for that event.

Video walkthrough

Download Extension

👋 Heads up! We provide limited support for extensions, but you can still open a ticket over at our Help Desk to report any issues.
Install Instructions