Raffle with code verification

Hello gravity community,

We use gravity forms extensively, but I could use some help right now.

We would like to hold a raffle and it should go like this:

Visitors to a city festival receive a beautifully designed festival wristband free of charge. (Normally used for admission control at festivals or concerts)

A unique 8-digit code is printed on the strap.
The code contains numbers and letters.

This code can be entered online in a form.

So far no problem.

But now we would like to draw instant prizes and later organize a raffle among all participants.

The raffle among all participants is easy, we simply take all the codes sent in and determine winners using a random number generator.

But how do we reliably get the form to display an instant win directly? So directly in the form “You have won prize X” and then an email is sent with the instant prize.

So we need the comparison:

  • Has user made an instant win with the code
    -Show Instant Win
  • Send an email with a voucher code from a list (e.g. entry to an amusement park)
    Send each voucher code only once.

We have a total of 6000 ribbons with codes, so up to 6000 users can register

thank you!

kind regards

The combination of gform_notification filter and gform_confirmation filter can let you customize what is in the email or which page they redirect to respectively.

Where/how are the codes stored in your WP site?
As a custom post type or separate form that you could update a codes status that it has been sent?

If it is entry based, the GFAPI::update_entry_field is probably one you would tap into.

If you want more traceability about entries updated, codes used, etc. it might be a good case to look at Gravity Flow for. The confirmation wouldn’t be much different, but you could use a Form Connector Update Fields step type to retrieve the latest code that has not already been used to populate without requiring code. Along with Update an Entry step type to mark that code as used.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.