Send every signup a ready-made promo code.

Running a subscriber offer, event promotion, or rewards campaign? Load the codes you already have, allocate an available one when the form is submitted, and include it in the confirmation and email.

Moonlight Market offer 18 available

A promo code with every signup.

MARKET-4471 Sent with the last signup
Allocated
MARKET-4472 Ready for the next signup
Next
MARKET-4473 Available in the pool
Available
One allocation per code

Illustrative experience

  • Use codes you already have
  • One allocation per code
  • Send in the confirmation and email

The finished experience

The offer arrives without a manual handoff.

Each signup receives a code from your existing pool. An inventory limit of one keeps a claimed code out of later allocations through this form, while the system accepting the code controls redemption.

A good fit for
Teams distributing existing promotional codes through a signup form, where exposing the pool in page source is acceptable.

  1. 1

    Load the promotional codes.

    Store one code per entry in an admin-only backend form. On the signup form, use Populate Anything to fill a Drop Down from those entries, with the code as its choice value and label.

    GP Populate Anything

  2. 2

    Set one allocation per code.

    Enable GP Inventory on the Drop Down and set each populated choice’s inventory limit to one. Hide exhausted choices and show a finished-campaign message when the pool is empty. Keep submitted entries: deleting them restores availability.

    GP Inventory

  3. 3

    Choose the next available code.

    Configure the free Round Robin snippet with the signup form and Drop Down field IDs. It hides the field, selects the next available choice on submission, and skips choices whose inventory is exhausted.

    Gravity Forms

  4. 4

    Deliver the offer.

    Add the code field’s merge tag to the confirmation and customer notification. Include the redemption instructions and expiry date set by the system that issued your codes.

    Gravity Forms

What you’ll need.

Start with Gravity Forms. Add the capabilities this solution needs, then make the experience your own.

Before you start

  • GP Populate Anything, GP Inventory, and the free Round Robin snippet configured with the signup form and code field IDs.
  • An existing pool of promotional codes and a system that accepts them. Configure redemption limits, eligibility, and expiry in that system; this form distributes codes rather than generating or redeeming them.
  • Every populated code is discoverable in the page source. Use this recipe only where exposing the pool is acceptable. Private vouchers, access credentials, and other secret codes need a server-side allocator instead.
  • Set each code’s inventory to one and hide exhausted choices. Preserve the signup entries used to count allocations, and test caching and simultaneous submissions before launching the campaign.

Free snippets it also uses

Snippets are free, and each one carries its own instructions in the Snippet Library .

Get this built.

A plan covers how many of our plugins you run at once, and on how many sites. Here is what this one needs.

Required

  • GP Populate AnythingPerks

  • GP InventoryPerks

Gravity Perks Advanced $169 /year

2 perks need Advanced or above — on up to 3 sites.

See plans for this solution

Every plan renews at the same price, and you can upgrade any time for the difference.

Make it fit
your project.

What kinds of campaigns does this support?

Subscriber offers, event promotions, and rewards campaigns that already have a batch of codes to distribute. The linked Stonebridge Car & Pet Wash story used codes from a subscription app. That is one example of the broader distribution job.

Does the original customer story use Inventory?

The spotlight describes Populate Anything and Round Robin. This recipe adds GP Inventory’s supported choice limits so allocated codes can be removed from the available pool. That is a current extension of the recipe, not a claim about the customer’s original setup.

What happens when the pool runs out?

Round Robin alone cycles back to the beginning. With GP Inventory set to one per code, exhausted choices are excluded. Enable the exhausted-inventory message so visitors know the offer has finished until you add more codes.

Does one allocation mean one redemption?

No. Inventory limits allocation through this signup form. The system accepting a code must enforce its redemption limit and expiry. This also does not stop a person making several signups for different codes.

Can a visitor find the codes in the page source?

Yes. Hiding the Drop Down does not keep its populated choices secret. A visitor could discover an unused code before it is allocated. Use this approach only where that exposure is acceptable; private codes need a different server-side allocation implementation.

Can the form generate new coupons instead?

Yes. The related discount codes solution creates a unique Gravity Forms coupon for each signup, and the bulk coupons solution creates a batch. This recipe is for distributing codes that already exist.

  • Clay, CTO
  • Dan, Content Sorcerer
  • Dani, Product Manager
  • David, Founder & CEO
  • Matt, Senior Support Wizard
  • Roxy, Support Wizard

Not quite your build?

Tell us what you are making and we will work out which pieces it takes — or tell you straight if this is not something we can do.

Ask the wizards