Creating a Raffle Form

I’m hoping for some assistance…

My company is looking to create a raffle form using the Gravity Forms plugin, the idea is to have users fill out an entry, choose how many tickets, and then have ticket numbers provided once the payment is made for that entry.

While I can get close to the desired functionality, there are a few hurdles that if anyone could advise on, it would help greatly.

  1. The Unique ID field which increases sequentially with submissions to track entries can’t be conditioned to change with the number of tickets. So if user A buys 5 tickets he will still only be assigned 1 ticket entry.

  2. The form seems to submit each entry regardless of payment status, and subsequently could give ticket IDs to users who do not complete their payment.

Has anyone managed to create something similar with Gravity Forms, or have any advice?

Hi Bryn, are you using GP Unique ID? If so, we have a handy snippet that will let you generate multiple “tickets” (aka IDs) per submission.

It doesn’t currently support sequential IDs but I’d be happy to take a look at the if this would otherwise meet your needs.

Additionally, GP Unique ID will wait for payment before generating anything by enabling the gpui_wait_for_payment filter.

add_filter( 'gpui_wait_for_payment', '__return_true' );
1 Like

Thanks for your reply @david - Appreciate it.

We are using GP Unique ID yes. Could you perhaps let me know where the code should be placed for the multiple submission code above? Is this just an entry for the Functions.php or is it a separate .php file that I need to place in the plugins directory?

Hi Bryn. That is additional PHP that can be added to your theme functions.php, or a functionality plugin if you are using one. It’s not a plugin on its own that can live in the plugins directory. Thank you.

Thanks for the responses and assistance, I’m still having trouble getting this to work and would appreciate any further assistance.

I’ve added the above code into our functions.php, but can’t seem to get the required functionality out of them.


add_filter( 'gpui_wait_for_payment', '__return_true' );

seems easy enough, but entries still get listed immediately after submission of the form, it doesn’t seem to wait for payment before completing the submission.

And then finally, the above Multiple ID code. I’m not entirely sure on the configurations required (target vs source ID, count etc). If possible, a private message to assist further by anyone who is able to help would be amazing.

Hi Bryn. Have you contacted GravityWiz support?

Unfortunately, I am unable to get hold of support through the website as our website was developed by a freelance developer who registered the GravityWiz product under an account that I don’t have access to.

@david - Could you perhaps provide me with a way to get in touch for assistance with the UniqueID perk?

That’s a bummer, Bryn. We’ll be happy to support your directly if you pick up your own license. Our support is worth it!

PS - Sent you a DM.

1 Like