Home › Forums › Ticket Products › Event Tickets Plus › Function to render the RSVP form in a loop?
- This topic has 7 replies, 2 voices, and was last updated 5 years, 6 months ago by justinacarter.
-
AuthorPosts
-
August 13, 2018 at 5:40 pm #1596691justinacarterParticipant
Hello,
My client has a site with a large number of event listings – none have tickets, but some have RSVP and some do not.They would like people to be able to rsvp to any event from a single RSVP page, in addition to being able to rsvp on the single event page.
To do that, Cliff proposed in another place that I should loop through the events with tribe_get_events() and check if they’re ticketable/rsvpable with tribe_events_has_tickets(). So far, so good
However, I also then need to be able to output the rsvp form for that event (by ID, i suppose). Is there a function to output the RSVP form by event ID from within a loop? For what it’s worth, my goal is to give the front end user a select box with the titles of all the events they COULD rsvp to, and use that to show/hide Bootstrap “tabs” with the appropriate RSVP signup form for that event.
August 15, 2018 at 8:06 am #1597967AndrasKeymasterHi Justin,
Thanks for reaching out!
Please give me some time to look into this.
Please also note, that this essentially looks like a custom development task and so is outside of our stated scope of support.
We do need to prioritize support requests from other customers at this time but I’ll certainly flag this with the team and I will get back to you as soon as I can.
If you urgently need help with this, however, you may instead wish to consider working with a suitably skilled developer or designer who can offer the additional level of support you require.
Cheers,
AndrasAugust 15, 2018 at 1:45 pm #1598420justinacarterParticipantKöszönöm András,
Thank you for looking into it.
The classes Tribe__Tickets__Tickets_View and Tribe__Tickets__RSVP are obviously the classes involved, but there are conditionals within these classes that seem to prevent them operating outside of specific plugin-defined situations. For example, from the Tribe__Tickets__RSVP class:
/** * Enqueue the plugin stylesheet(s). * * @author caseypicker * @since 3.9 * @return void */ public function enqueue_resources() { $post_types = Tribe__Tickets__Main::instance()->post_types(); if ( ! is_singular( $post_types ) ) { return; } wp_enqueue_style( 'event-tickets-rsvp' ); wp_enqueue_script( 'event-tickets-rsvp' ); // Check for override stylesheet $user_stylesheet_url = Tribe__Templates::locate_stylesheet( 'tribe-events/tickets/rsvp.css' ); // If override stylesheet exists, then enqueue it if ( $user_stylesheet_url ) { wp_enqueue_style( 'tribe-events-tickets-rsvp-override-style', $user_stylesheet_url ); } }
So it seems like i need to duplicate the results of some of these functions in my own code.
But from the point of view of the software design, it seems like rendering this form should be a more accessible function, more like a template tag.
August 15, 2018 at 1:58 pm #1598437justinacarterParticipantBy the way, if decide you’re not able to provide support to this ticket please let me know.
Getting support for this issue is the reason I purchased the Plus plugin license – I don’t need the Event Tickets Plus functionality.
If you can’t provide this type of support, i will apply for a refund and spend the money on a developer.
August 16, 2018 at 7:47 am #1598963AndrasKeymasterHi Justin,
I had a chat with a developer and got this info:
“they’d need to take and adapt the Tribe__Tickets__RSVP::front_end_tickets_form() function – tweaking it to suit their needs (and customizing the RSVP messaging so that success messages etc only apply to the correct individual form within the loop etc, which it isn’t built for right now). So that function would be a pretty good starting point for them, but there’s a bit of work ahead to re-sculpt it.”
if decide you’re not able to provide support to this ticket please let me know
I’m glad you brought this up. Custom development like this one is definitely out of the scope of our support.
We may be able to assist you further. We do need to prioritize support requests from other customers at this time but I’ll certainly flag this with the team and – although we can’t make any promises – if we have time and space to come back and help, we’ll be happy to do so. Please let us know if you’d like to go this route so that you can be added to this queue.
In the meantime, if there is any more information you can share (including mocks) that will help us to better understand what you are seeking please do feel free to add them to this ticket.
If you urgently need help with this, however, you may instead wish to consider working with a suitably skilled developer or designer who can offer the additional level of support you require.
And of course, if you would like to ask for a refund, you can do that here and my colleague will process that as soon as possible.
Cheers,
AndrasAugust 16, 2018 at 10:04 am #1599188justinacarterParticipantHi András,
What I understand your developer to be saying here:
“they’d need to take and adapt the Tribe__Tickets__RSVP::front_end_tickets_form() function – tweaking it to suit their needs (and customizing the RSVP messaging so that success messages etc only apply to the correct individual form within the loop etc, which it isn’t built for right now). So that function would be a pretty good starting point for them, but there’s a bit of work ahead to re-sculpt it.”
…is that i need to declare a different but similar class that is a rewrite of Tribe__Tickets__RSVP, and contains the functionality I need, because obviously i cannot redeclare methods of that class.
Since
class Tribe__Tickets__RSVP extends Tribe__Tickets__Tickets
I would similarly declare my class, sayJustin__Tickets__RSVP
, as an extension of Tribe__Tickets__Tickets. I am comfortable doing that, and I’ve already customized the html and js of the form. Could you however please run that outline by the developer and see if they agree a new class is how i should structure it?August 16, 2018 at 12:59 pm #1599362justinacarterParticipantI would like to point out that with Tribe Tickets/RSVP script enabled on an event page, my browser indicates that “This page uses significant resources” and suggests closing the browser tab.
Hopefully your developers are aware of this, it’s not good.
August 18, 2018 at 12:14 am #1600374AndrasKeymasterHi Justin,
I will run it by the dev and will get back to you. I ask for a bit of patience.
Have a great weekend!
Andras
September 9, 2018 at 9:35 am #1617077Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Function to render the RSVP form in a loop?’ is closed to new replies.