🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Credits Premium Add-on Setup Guide

Updated 12 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What You Get
  3. How It Differs From the Built-in myCred Hook
  4. Requirements
  5. Install and Activate
  6. Add a Feed
  7. Awarding and Deducting Points
  8. Pay With Points
  9. Giving a Badge or Setting a Rank
  10. Who Gets the Reward
  11. Once for Every Entry
  12. Gate a Form by Points or Rank
  13. Merge Tags and Prefill
  14. For Developers
  15. Limits to Know
  16. Frequently Asked Questions
  17. Do I need a paid myCred add-on?
  18. Can a visitor give or take points from someone else?
  19. Does it send data outside my site?

Video walkthrough

Gravity Forms myCred: Award Points, Pay with Credits, Badges and Ranks
Watch the Credits add-on award myCred points, take payment in credits and gate a form by rank. Watch on YouTube

Credits joins Gravity Forms and the free myCred plugin. A feed on your form gives points, takes points, takes payment in points, gives a badge or sets a rank, once for every entry. Merge tags and prefill show a member their own balance, and a gate can hide a form or block it until the member has enough points or a high enough rank. Use it for a loyalty club, a points shop where a form is paid with points, a course community, a member feedback bonus or a reward for finishing a profile.

A Gravity Forms form that shows a logged-in member their myCred balance: 95 coins, 18 experience points, the rank Silver and 1 badge, filled in by merge tags
A form can show the member their own balance, rank and badge count.

What You Get

  • A feed with six actions: Award myCred points, Deduct myCred points, Pay the form total with myCred points, Give a myCred badge, Set a myCred rank and Hide or block the form unless the user has enough points or a rank.
  • Points that are a fixed number, or the answer of a number, calculation, quantity or total field, with a multiplier and a cap for each entry.
  • Any myCred point type, including types with decimals, in separate feeds of the same form.
  • Pay with points: the form total is turned into points at a rate you set, a member with too few points cannot send the form, and the entry is marked as paid.
  • Every move goes through the public myCred functions, so the myCred log, its hooks, its exclude settings and its email notices work as for any other change.
  • Once for every entry: resending a notification, editing the entry or running the feeds again never rewards or charges a second time.
  • The logged-in user is rewarded, with no account needed. As an option, a visitor can be matched or created by email, with the same safety rules as our other add-ons.
  • Merge tags and prefill for the balance, rank and badge count of the member.
  • Conditional logic, delayed payment support, entry notes, and a clear notice when myCred is missing or too old.

How It Differs From the Built-in myCred Hook

myCred ships its own hook for Gravity Forms, called GravityForms Submissions. You switch it on in myCred, choose a form, and give a fixed number of points to the logged-in user for every submission of that form. It only gives points: no deduction, no payment, no badge, no rank, no cap, no condition, no merge tag, no gate and no note on the entry, and the number cannot come from an answer of the form in the usual Gravity Forms way. Credits works from the other side: the form says what happens. The two can live together on one site, because each writes its own line in the myCred log.

Requirements

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer.
  • The free myCred plugin, version 2.0 or newer. This version was tested with myCred 3.2.6. The Ranks and Badges add-ons of myCred are only needed for the rank and badge actions.
  • A GravityExtra license key.

Install and Activate

  1. Install and activate Gravity Forms and the free myCred plugin if they are not active yet, and finish the myCred setup.
  2. Switch on the myCred Ranks and Badges add-ons if you want to set ranks or give badges, and create at least one rank or badge.
  3. Upload and activate the Gravity Forms Credits Premium Add-on.
  4. Go to Forms → Settings → Credits, enter your license key and press Activate.

Add a Feed

Open Form Settings → Credits, press Add New, choose an action and fill in the sections that appear.

The Credits feed settings in Gravity Forms: the action, who gets the reward, the point type, an amount taken from a form field with a multiplier and a cap, and the log text
One feed: what to give, to whom, and how much, taken from a field if you like.
Setting What it does
Action Award points, deduct points, pay with points, give a badge, set a rank, or gate the form. The sections of the page change with the action.
User The logged-in user (the default): a visitor gets nothing and the entry note says so. Or the logged-in user, and for a visitor the account of the email in the form. Deductions and payments always use the logged-in user.
Point type One of your myCred point types.
Amount A fixed amount, or the answer of a form field. The answer is read as a number: 40, 1,250.50 or a product choice that holds a price all work. Anything else moves nothing and the entry gets an error note.
Multiplier The answer is multiplied by it and rounded down to the decimals of the point type. 0.5 gives one point for every two units, 10 gives ten points for each unit.
Largest amount per entry A cap. One entry never moves more than this, whatever a field holds. There is also a hard limit of 1,000,000 points for one feed and one entry.
When the balance is too low For a deduction: take nothing and write an error note, or take what the user has down to zero. A negative myCred balance counts as having nothing.
Log text The text shown in the myCred log. Form merge tags work. Empty uses a short default text, because myCred writes no log line for an empty text.
Once per user Reward each user only once with this feed, however many entries they send.
Condition Run the feed only when the conditional logic you set is met.

Awarding and Deducting Points

Points are moved with the myCred functions mycred_add and mycred_subtract, so the move appears in the myCred log, with the reference gfxmycred_award or gfxmycred_deduct and the entry number as the reference id. The balance is read before and after, and the entry note tells the real change: for example Awarded 25 Coins to user 14 with myCred: balance 0, now 25. A user who is kept out of the point type by the myCred exclude settings gets nothing and the entry says why.

A deduction takes only what the user has. With the setting Deduct nothing and write an error note, a user who has 20 coins and is asked to pay 30 loses nothing and the entry says why. Use that for a redeem form: the entry shows the failure and you can handle it. With Deduct what the user has the balance goes to zero. myCred itself allows a negative balance, and this add-on never creates one.

Pay With Points

Choose the action Pay the form total with myCred points on a form that has product fields. Set Points for one currency unit: with a rate of 10, a total of 40.00 costs 400 points. The price is rounded up to the decimals of the point type, so the shop is never short by a fraction.

  • On the last page of the form the add-on checks the balance. A member with too few points sees your message, with the points needed, the points the member has and the points missing, and the form is not sent. Nothing is taken.
  • A visitor who is not logged in cannot send a form that is paid with points, and is asked to log in.
  • After the entry is saved, the points are taken once, with the reference gfxmycred_pay. The entry is marked Paid with the payment method myCred points and the form total as the amount, unless you switch that option off.
  • A form with no total above zero is not refused. The entry gets an error note that there was nothing to pay.
  • If the balance changed between the check and the saving, the entry says that nothing was paid and is marked as failed.

Giving a Badge or Setting a Rank

Pick a badge from the list of your published badges. The add-on gives the first level of the badge with the myCred badge function. A user who already has it is told so in the entry note and nothing is given again. A draft badge is never given, and the feed says so when the Badges add-on of myCred is switched off.

For a rank, pick a published rank. myCred can work out ranks from the balance, or you can set them by hand. A form can set a rank only when the ranks of that point type are set to Manual in the myCred Ranks settings. In automatic mode the entry gets an error note that explains it, because the next balance change would undo the rank anyway. With the option Promotion only, which is on by default, the rank is set only when its minimum balance is higher than the rank the user has, so a form can never lower a member. Turn it off if a form should be able to move a member to any rank.

Who Gets the Reward

The default is the logged-in user. No account is created or changed. A visitor gets nothing, and the entry note says that the visitor was not logged in.

For a public form such as a contest, choose the second option for awards, badges and ranks. A visitor then gets the account of the email in the form. The add-on is careful here, because a form is open to everyone.

  • An email that already has an account is refused by default. With the setting set to reward that account, the account only gets the reward: its name, password, role and everything else stay as they are.
  • An account that can manage the site or users is never rewarded from an email address, even if you allow existing accounts.
  • A new account gets the WordPress default role, or another role from the list. Roles that can manage users or the site, write posts, upload files or export data are never in the list, even if a feed was saved with one.
  • A deduction and a payment always affect the logged-in user only. A visitor can never take points from another account by typing its email.
  • The new account e-mail with a link to set a password is on by default, and the notice to the administrators is off.

Once for Every Entry

Each entry is rewarded or charged once by each feed. The add-on marks the entry before it calls myCred, so running the feeds again, resending notifications or editing the entry in the admin never moves points a second time. A note says Already rewarded by this feed. For a bonus that should go to every member only once, tick Once per user, and the next entries of that member are skipped with a note.

Gate a Form by Points or Rank

Change the action to Hide or block the form unless the user has enough points or a rank. This feed does nothing when the form is sent. It decides what the visitor sees and what the form accepts.

The form gate settings: the point type, the balance needed, the rank needed, hide or block mode and the message with the missing points
A gate hides or blocks the form for people who have not earned it yet.
  • Point type and points needed: the user needs at least that balance, decimals included. Leave it empty for no points rule.
  • Rank needed: the user needs that rank or a higher one of the same point type. A higher rank is one with a higher minimum balance. With both rules set, the user needs both.
  • Hide the form and show the message, or show the form with the message and refuse the submission.
  • Message: plain text. Use the points the user has, the points needed, the points missing, the point type and the rank needed in curly braces. The default message says how many points are needed and how many the user has.

A visitor who is not logged in has no points, so the message includes a link to log in. A submission that is sent anyway, for example by a script, is refused in both modes. An inactive gate does nothing. With no myCred or no license the gate stays open, so a form is never locked by accident.

Merge Tags and Prefill

Merge tag Value
mycred_points in curly braces The balance of the member in the main point type. Add a colon and the point type key, such as mycred_points:coin, for another type.
mycred_rank in curly braces The title of the rank of the member in a point type. A point type key can follow a colon.
mycred_badges in curly braces The number of badges the member holds.
mycred_awarded in curly braces The points this entry moved, for example 40 or -400. Add a colon and a point type key for one type.
mycred_new_balance in curly braces The balance of the member after the entry.

The tags work in confirmations and notifications, and in the default value and placeholder of a field, where they show the balance of the logged-in member. They appear in the merge tag list of the form editor. You can also fill a field by a parameter name: switch on dynamic population for the field and use mycred_points, mycred_points_coin, mycred_rank or mycred_badges. The value always comes from the logged-in user. A value in the page address can not override it, and a visitor gets an empty field.

Each entry gets a note for every step: the account that was made, the points that moved with the balance before and after, the badge, the rank, and the reason for anything that was not done.

For Developers

The add-on calls mycred_add, mycred_subtract and mycred_get_users_balance for points, mycred_save_users_rank and mycred_get_users_current_rank_id for ranks, and mycred_assign_badge_to_user, mycred_user_has_badge and mycred_get_users_badges for badges. The log lines carry the references gfxmycred_award, gfxmycred_deduct and gfxmycred_pay, the entry id as the reference id, and the form, entry and feed ids as data. Because everything goes through myCred, the myCred filter mycred_add can stop a move, and the add-on notices that nothing moved and writes an error note. The filter gfxmycred_gate_verdict changes the result of a gate for a form and a user.

Limits to Know

  • It is not a payment gateway and does not take or return money. Pay with points only spends points. For money, use a payment add-on, and tick the option to reward only when the payment is completed.
  • It does not give points back when an entry is deleted or a payment is refunded. Use a feed for that.
  • Ranks can be set from a form only in the manual rank mode of myCred.
  • A badge is given at its first level. Levels that myCred awards by its own rules stay with myCred.
  • A gate works on the page the form is shown on. It does not protect a page that is not a form.

Frequently Asked Questions

Do I need a paid myCred add-on?

No. The add-on works with the free myCred plugin from wordpress.org, and with its free Ranks and Badges add-ons.

Can a visitor give or take points from someone else?

Only awards, badges and ranks can go to the account of a typed email, and only if you set a feed that way. Never a deduction or a payment. An account that can manage the site is never rewarded this way.

Does it send data outside my site?

No. Everything happens on your own site. Only the license check talks to gravityextra.com, when you press Activate.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr