Support

Home Forums Event Espresso Premium Admin-only question auto number based on category selected by user

Admin-only question auto number based on category selected by user

Posted: February 7, 2023 at 2:50 pm

Viewing 11 reply threads


webmike

February 7, 2023 at 2:50 pm

Hello EE team,

I would like to have an admin-only question field that will populate a number which is auto-incremented. This is for a parade where each participant will wear a badge number, similar to a marathon race (with various categories). The starting number should be based on a category that a registrant selects on the frontend registration form.
E.g.
Easy: Start with 1000 and auto-increment
Medium: Start with 2000 and auto-increment
Hard: Start with 3000 and auto-increment
etc.
We do not expect more than 100-200 registrations per category, so there is no risk to run out of numbers per category.

Then I want the ability for that number to be shown on the email to the registrant and hence on the ticket (as a badge) via the ticketing add-on (so the registrant can print it themselves). The whole purpose of this is for the organizer not having to print the badges.

After reading through the forum, I understand I can create an admin-only field and then edit it manually one by one in the admin after the fact. (In that case, can I send the ticket via the ticketing add-on later?). Though imagine doing that for 200-400 registrants, too time consuming. Or do you already have an edit feature for the admin only field in list view as batch edit?

So how can I go about this customization?
Thanks,
Mike


webmike

February 7, 2023 at 3:20 pm

By the way, from reading here https://eventespresso.com/rich-features/customizable-ticket-quote/, currently the ticketing add-on will create links to a PDF file of the ticket that the registrant can print out, correct?


Tony

  • Support Staff

February 10, 2023 at 7:24 am

Hi there,

We don’t have an auto-incrementing feature like this built into Event Espresso so the option to manually add these values using an admin question would be the only way to do this that is built directly within Event Espresso itself.

After reading through the forum, I understand I can create an admin-only field and then edit it manually one by one in the admin after the fact. (In that case, can I send the ticket via the ticketing add-on later?).

This is correct and yes, the answer to admin-only questions can be included in the ticket using a shortcode.

Though imagine doing that for 200-400 registrants, too time consuming. Or do you already have an edit feature for the admin only field in list view as batch edit?

No, we don’t have a batch method for editing questions.

If you are comfortable with PHP then, it would be possible to create a snippet that hooked into when the registration status was set to Approved and set the answer to the above question via code. The time invested in doing may be less than doing all of the above manually and could then be reused.

By the way, from reading here https://eventespresso.com/rich-features/customizable-ticket-quote/, currently the ticketing add-on will create links to a PDF file of the ticket that the registrant can print out, correct?

EE4 does not send a ticket PDF, it sends a link which opens up on the site and displays the ticket directly within the browser. The user can print the page using the browser if needed but there is no ‘Ticket PDF’ to download at this time.


webmike

February 10, 2023 at 2:44 pm

Hi Tony, thank you for your answers and insights.
Just one clarification question regarding the ticketing add-on: Can the email with the link to the ticket be sent manually at a later time from the admin?
We wouldn’t want it sent automatically right after registration.


Tony

  • Support Staff

February 13, 2023 at 5:53 am

Yes, but it will need a little bit of admin work.

The ticket link is sent in a ‘ticket notice’ email which by default will automatically trigger when the registration approved message sends and whilst we don’t have an ‘option’ to not send it, you can disable it using a custom message template.

Go to Event Espresso -> Messages -> Default Message Templates.

Find the ‘Ticket Notice’ message type and click the ‘Create Custom’ button.

Thats going to create a custom message template and take you to edit it directly.

Give it a meaningful name (for this I recommend including ‘Disabled’ in the name so you know what it is for).

Hit save (If any of the fields complain about being required, just add a space to the field and save).

Make sure the toggle switch at the top of the page is grey (disabled) and not green (enabled), just click it to switch.

Once saved, select ‘Registrant’ in the context switcher dropdown at the top of the page and click ‘Switch Recipient’.

Now make sure the toggle switch is disabled again.

What you’ve done there is create a custom message type where all of the registrants are disabled, so it basically does nothing.

Now edit the event itself and in the Notifications section, find the Ticket Notice message type and set it to use that custom message template that has been disabled.

That notice is now disabled, when you want to trigger it later you select a the global template (or another custom template that is not disabled) and use the ‘Resend ticket notice’ button from the registration list to send the notice.


webmike

February 23, 2023 at 5:46 pm

Thank you for all the great advice.
I have created the admin question, however I do not see its short code in the custom message ticket HTML. How do I get it in there?
What is [PRIMARY_REGISTRANT_ANSWER_*]. Can I replace the star with the admin field name?
What is [QUESTION] for under question list?


Tony

  • Support Staff

February 24, 2023 at 3:35 am

I have created the admin question, however I do not see its short code in the custom message ticket HTML.

We don’t dynamically display shortcodes like that in the message system as you could end up with hundreds of shortcodes for your questions, so we display the shortcode so you know the format and you can pull in any question using that.

You can use [RECIPIENT_ANSWER_*{question_text}] (NOT admin text)

The question text must match exactly, so if your question is text is ‘Do you Like ChEeSe?’ the shortcode would be:

[RECIPIENT_ANSWER_*Do you Like ChEeSe?]

What is [PRIMARY_REGISTRANT_ANSWER_*]

It is the same as the above but will always pull the answer from the primary registrant of the group. Say you have a group of 5 tickets and used the above shortcode it will pull the sam value from the 1 of 5 registrants for all of the tickets.

Can I replace the star with the admin field name?

No, leave the star in place, that’s how the code determines where the shortcode ends and your question text begins.

What is [QUESTION] for under question list?

If you use the [QUESTION_LIST] shortcode somewhere then that section is passed ALL questions assigned to the registrant and loops over each individual one and parses whatever is that section for each on.

So, we need a way for you to output the question itself ([QUESTION]) and the answer to that question ([ANSWER]) dynamically.

You only use that section if you want to output all of the question assigned to a registrant, now specific ones (thats what the above shortcode is for)


webmike

March 8, 2023 at 7:03 pm

Thank you, that works great.

I ran into another issue.

In the email I have the following shortcode for the ticket link:

Print your name tag(s) here!

When a registrant buys 2 or more tickets, it prints them both/all (even though I have html only for one ticket), and the problem is that the 2nd and subsequent tickets don’t have any custom questions.

I really want the user to print just the first ticket of each registration, same when you click on ticket in the admin.

How can that be done? I’ve already tried the shortcode [TXN_TICKETS_URL], didn’t fix it either.


webmike

March 8, 2023 at 7:11 pm

This reply has been marked as private.


Tony

  • Support Staff

March 9, 2023 at 5:31 am

The [TXN_TICKETS_URL] URL pulls in all the tickets for the transaction.

Try [RECIPIENT_TICKET_URL] which should pull in the ticket for the specific registrant in question.


webmike

March 9, 2023 at 7:10 am

Thanks, Tony, that shortcode works.


Tony

  • Support Staff

March 9, 2023 at 7:34 am

Awesome 🙂

Viewing 11 reply threads

The support post ‘Admin-only question auto number based on category selected by user’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso