{"id":1952728,"date":"2022-05-06T04:30:29","date_gmt":"2022-05-06T08:30:29","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1952728"},"modified":"2026-04-16T13:57:39","modified_gmt":"2026-04-16T17:57:39","slug":"customizing-rsvp","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-rsvp\/","title":{"rendered":"Customizing Event Tickets RSVPs"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-limit-users-to-one-rsvp-per-event\">Limit Users to One RSVP Per Event<\/h2>\n\n\n\n<p>By default, users can RSVP to events as many times as they&#8217;d like. If you&#8217;d prefer to limit users to a single RSVP per person, you can make that happen with some customizations. You can add a snippet to limit the RSVP functionality and then create a template override to customize the appearance of the form once a user has already RSVP&#8217;ed.<\/p>\n\n\n\n<p>We&#8217;ll walk you through the steps here.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prerequisites<\/h4>\n\n\n\n<p>For this to work, you need to require users to log in before they RSVP. You can find the respective setting under <strong>Tickets &gt; Settings &gt; General<\/strong> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/05\/et-rsvp-login-requirements-1024x163.jpg\" alt=\"Login requirements for one RSVP to work\" class=\"wp-image-1952734\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-snippet\">The Snippet<\/h4>\n\n\n\n<p>The first thing you&#8217;ll want to do is add the following snippet to your functions.php file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_tickets_get_ticket_max_purchase&#039;, function( $stock ) {\n\tif ( $stock &lt; 1 ) {\n\t\treturn $stock;\n\t}\n\treturn 1;\n} );\n<\/pre><\/div>\n\n\n<p>This will limit the RSVP so that users can only submit a single RSVP at once.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-template-override\">Template Override<\/h4>\n\n\n\n<p>The next step in the process is to create a template override. If you&#8217;re not familiar with template overrides, check out <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/customizing-template-files-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">this Knowledgebase article<\/a>.<\/p>\n\n\n\n<p>Create a file at: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[your-theme]\/tribe\/tickets\/v2\/rsvp\/actions\/rsvp.php<\/pre>\n\n\n\n<p>Add the following to that template to include a custom message if a user tries to purchase multiple RSVPs:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\/**\n * Block: RSVP\n * Actions - RSVP\n *\n * This is a template override for the following file:\n * event-tickets\/src\/views\/v2\/rsvp\/actions\/rsvp.php\n *\n * Place this template in your own theme by creating a file at:\n * &#x5B;your-theme]\/tribe\/tickets\/v2\/rsvp\/actions\/rsvp.php\n *\n * See more documentation about our Blocks Editor templating system.\n *\n * @link https:\/\/evnt.is\/1amp Help article for RSVP &amp; Ticket template files.\n *\n * @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.\n *\n * @since 4.12.3\n * @version 4.12.3\n *\/\n\n$user = wp_get_current_user();\n$event_id = get_the_ID();\n\n\/** @var Tribe__Tickets__Tickets_View $tickets_view *\/\n$tickets_view = Tribe__Tickets__Tickets_View::instance();\n\n?&gt;\n&lt;div class=&quot;tribe-tickets__rsvp-actions-rsvp&quot;&gt;\n\t&lt;span class=&quot;tribe-common-h2 tribe-common-h6--min-medium&quot;&gt;\n\t\t&lt;?php esc_html_e( &#039;RSVP Here&#039;, &#039;event-tickets&#039; ); ?&gt;\n\t&lt;\/span&gt;\n\n    &lt;?php if ( ! $tickets_view-&gt;has_rsvp_attendees( $event_id, $user-&gt;ID ) ) : ?&gt;\n        &lt;?php $this-&gt;template( &#039;v2\/rsvp\/actions\/rsvp\/going&#039;, &#x5B; &#039;rsvp&#039; =&gt; $rsvp ] ); ?&gt;\n\n        &lt;?php $this-&gt;template( &#039;v2\/rsvp\/actions\/rsvp\/not-going&#039;, &#x5B; &#039;rsvp&#039; =&gt; $rsvp ] ); ?&gt;\n    &lt;?php else : ?&gt;\n        &lt;p&gt;Sorry - only one per customer!&lt;\/p&gt;\n    &lt;?php endif; ?&gt;\n\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-result\">The Result<\/h4>\n\n\n\n<p>After setting this up, a user who has already RSVP&#8217;d to an event should see something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/05\/et-one-rsvp-per-person.png\" alt=\"Message that appears when setting to one RSVP\" class=\"wp-image-1952735\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-disable-going-button\">Disable &#8220;Going&#8221; Button<\/h2>\n\n\n\n<p>You can disable the &#8220;Going&#8221; button entirely with the following snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\/**\n * Block: RSVP\n * Actions - RSVP - Going\n *\n * Override this template in your own theme by creating a file at:\n * &#x5B;your-theme]\/tribe\/tickets\/v2\/rsvp\/actions\/rsvp\/going.php\n *\n * See more documentation about our Blocks Editor templating system.\n *\n * @link https:\/\/evnt.is\/1amp Help article for RSVP &amp; Ticket template files.\n *\n * @var bool $must_login Whether the user has to login to RSVP or not.\n * @var Tribe__Tickets__Ticket_Object $rsvp The rsvp ticket object.\n *\n * @since 4.12.3\n * @version 4.12.3\n *\/\n$user = get_current_user_id();\n$tickets_view = \\Tribe__Tickets__Tickets_View::instance();\n$rsvp_count   = 0 &lt; $tickets_view-&gt;count_rsvp_attendees( get_the_ID(), $user );\n$disabled = $must_login || $rsvp_count;\n?&gt;\n\n&lt;div class=&quot;tribe-tickets__rsvp-actions-rsvp-going&quot;&gt;\n\t&lt;button\n\t\tclass=&quot;tribe-common-c-btn tribe-tickets__rsvp-actions-button-going tribe-common-b1 tribe-common-b2--min-medium&quot;\n\t\ttype=&quot;submit&quot;\n\t\t&lt;?php tribe_disabled( $disabled ); ?&gt;\n\t&gt;\n\t\t&lt;?php echo esc_html_x( &#039;Going&#039;, &#039;Label for the RSVP going button&#039;, &#039;event-tickets&#039; ); ?&gt;\n\t&lt;\/button&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-change-field-labels-on-the-rsvp-form\">Change Field Labels on the RSVP Form<\/h2>\n\n\n\n<p>Sometimes we need to change the default labels for the Name and Email fields on the RSVP form. For example, replacing the &#8220;Name&#8221; label with &#8220;Full Name.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"367\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_Name.jpeg\" alt=\"\" class=\"wp-image-1965105\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_Name.jpeg 609w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_Name-300x181.jpeg 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/figure>\n\n\n\n<p>What we can do is edit the corresponding template, in this case, it is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/wp-content\/plugins\/event-tickets\/src\/views\/v2\/rsvp\/form\/fields\/name.php<\/code><\/pre>\n\n\n\n<p>Changing the word &#8220;Same&#8221; to &#8220;Full Name&#8221; in the code as shown in fthe ollowing image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"782\" height=\"505\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/Name_php.jpeg\" alt=\"\" class=\"wp-image-1965106\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/Name_php.jpeg 782w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/Name_php-300x194.jpeg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/Name_php-768x496.jpeg 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/figure>\n\n\n\n<p>After this, our RSVP will be updated as we expected:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"362\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_FullName.jpeg\" alt=\"\" class=\"wp-image-1965107\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_FullName.jpeg 604w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/04\/RSVP_FullName-300x180.jpeg 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<p>It&#8217;s worth mentioning that while it&#8217;s true that you can modify the code in the template file, it&#8217;s good practice to apply the template override method to avoid losing changes in case there&#8217;s a plugin update that replaces the modified file with the original file.<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-template-files-2\/\">This guide<\/a><\/strong> describes the template override method step by step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-collecting-additional-guest-names\">Collecting Additional Guest Names<\/h2>\n\n\n\n<p>When using the RSVP functionality of Event Tickets, you&#8217;ll notice that only the main guest is asked or is required to submit their name and email address on the RSVP form. However, there may be a time when you need the names of the other guests that the main guests is bringing with. For this, we will tap on the Attendee Information feature of Event Tickets Plus and tweak it a bit to conform with our use case.<\/p>\n\n\n\n<p>Add a text field called &#8220;Guest Name&#8221; on the Attendee Information setting of your RSVP.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"494\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/image-1024x494.png\" alt=\"\" class=\"wp-image-1962466\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/image-1024x494.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/image-300x145.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/image-768x370.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/image.png 1388w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the <code>\\wp-content\\plugins\\event-tickets-plus\\src\\views\\v2\\components\\meta\\text.php<\/code> file to your <code>[theme or child-theme]\/tribe\/tickets-plus\/v2\/components\/meta\/<\/code> folder to override it.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Edit the &#8220;target&#8221; file (the one in your theme or child-theme folder) so it contains the code below, which does the following: It appropriately requires the guest name field for all other attendees and does not show the field to the main guest.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$multiline = Tribe__Utils__Array::get( $field, &#x5B; &#039;extra&#039;, &#039;multiline&#039; ], null );\n\nif ( $field-&gt;slug == &#039;guest-name&#039; ) {\n\tif ( $attendee_id === 0 ) {\n\t\t$required = false;\n\t}\n}\n?&gt;\n&lt;div\n\t&lt;?php tribe_classes( $classes ); ?&gt;\n\t&lt;?php tribe_attributes( $attributes ); ?&gt;\n&gt;\n&lt;?php if ( $attendee_id === 0 &amp;&amp; $field-&gt;slug == &#039;guest-name&#039; ) { return; } else { ?&gt;\n\t&lt;label\n\t\tclass=&quot;tribe-tickets__form-field-label&quot;\n\t\tfor=&quot;&lt;?php echo esc_attr( $field_id ); ?&gt;&quot;\n\t&gt;&lt;?php echo wp_kses_post( $field-&gt;label ); ?&gt;&lt;?php tribe_required_label( $required ); ?&gt;&lt;\/label&gt;\n\t&lt;div class=&quot;tribe-tickets__form-field-input-wrapper&quot;&gt;\n\t\t&lt;?php if ( $multiline ) : ?&gt;\n\t\t\t&lt;textarea\n\t\t\t\tid=&quot;&lt;?php echo esc_attr( $field_id ); ?&gt;&quot;\n\t\t\t\tclass=&quot;tribe-common-form-control-text__input tribe-tickets__form-field-input&quot;\n\t\t\t\tname=&quot;&lt;?php echo esc_attr( $field_name ); ?&gt;&quot;\n\t\t\t\tplaceholder=&quot;&lt;?php echo esc_attr( $placeholder ); ?&gt;&quot;\n\t\t\t\t&lt;?php tribe_required( $required ); ?&gt;\n\t\t\t\t&lt;?php tribe_disabled( $disabled ); ?&gt;\n\t\t\t&gt;&lt;?php echo esc_textarea( $value ); ?&gt;&lt;\/textarea&gt;\n\t\t&lt;?php else : ?&gt;\n\t\t\t&lt;input\n\t\t\t\ttype=&quot;text&quot;\n\t\t\t\tid=&quot;&lt;?php echo esc_attr( $field_id ); ?&gt;&quot;\n\t\t\t\tclass=&quot;tribe-common-form-control-text__input tribe-tickets__form-field-input&quot;\n\t\t\t\tname=&quot;&lt;?php echo esc_attr( $field_name ); ?&gt;&quot;\n\t\t\t\tvalue=&quot;&lt;?php echo esc_attr( $value ); ?&gt;&quot;\n\t\t\t\tplaceholder=&quot;&lt;?php echo esc_attr( $placeholder ); ?&gt;&quot;\n\t\t\t\t&lt;?php tribe_required( $required ); ?&gt;\n\t\t\t\t&lt;?php tribe_disabled( $disabled ); ?&gt;\n\t\t\t\/&gt;\n\t\t&lt;?php endif; ?&gt;\n\t\t&lt;?php if ( ! empty( $description ) ) : ?&gt;\n\t\t\t&lt;div class=&quot;tribe-common-b3 tribe-tickets__form-field-description&quot;&gt;\n\t\t\t\t&lt;?php echo wp_kses_post( $description ); ?&gt;\n\t\t\t&lt;\/div&gt;\n\t\t&lt;?php endif; ?&gt;\n\t&lt;\/div&gt;\n&lt;?php } ?&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<p>That&#8217;s it and Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Limit Users to One RSVP Per Event By default, users can RSVP to events as many times as they&#8217;d like. If you&#8217;d prefer to limit users to a single RSVP per person, you can make that happen with some customizations. You can add a snippet to limit the RSVP functionality and then create a template&#8230;<\/p>\n","protected":false},"author":19,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[59,79,88],"tags":[25,58,73],"stellar-product-taxonomy":[155],"class_list":["post-1952728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-function-snippets","category-snippets","category-tickets","tag-customizations","tag-php","tag-rsvp","stellar-product-taxonomy-event-tickets"],"acf":[],"taxonomy_info":{"category":[{"value":59,"label":"PHP Functions &amp; Snippets"},{"value":79,"label":"Snippets"},{"value":88,"label":"Ticketing"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":58,"label":"PHP"},{"value":73,"label":"rsvp"}],"stellar-product-taxonomy":[{"value":155,"label":"Event Tickets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Erica Eide","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/ericaeide\/"},"comment_info":0,"category_info":[{"term_id":59,"name":"PHP Functions &amp; Snippets","slug":"php-function-snippets","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":42,"filter":"raw","term_order":"0","cat_ID":59,"category_count":42,"category_description":"","cat_name":"PHP Functions &amp; Snippets","category_nicename":"php-function-snippets","category_parent":24},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":21,"filter":"raw","term_order":"0","cat_ID":79,"category_count":21,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0},{"term_id":88,"name":"Ticketing","slug":"tickets","term_group":0,"term_taxonomy_id":88,"taxonomy":"category","description":"","parent":61,"count":49,"filter":"raw","term_order":"0","cat_ID":88,"category_count":49,"category_description":"","cat_name":"Ticketing","category_nicename":"tickets","category_parent":61}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":36,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":26,"filter":"raw","term_order":"0"},{"term_id":73,"name":"rsvp","slug":"rsvp","term_group":0,"term_taxonomy_id":73,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1952728"}],"version-history":[{"count":5,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952728\/revisions"}],"predecessor-version":[{"id":1969242,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952728\/revisions\/1969242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1952728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1952728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1952728"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1952728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}