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

Gravity Forms Tip Field Premium Add-on Setup Guide

Updated 12 min read Gravity Forms Fields & Inputs
On this page
  1. Video walkthrough
  2. What You Get
  3. Requirements
  4. Installation
  5. Add the Field
  6. The Settings
  7. Presets
  8. Selected by default
  9. Custom amount
  10. No tip
  11. Rounding
  12. Show the amount next to each percentage
  13. Do not count shipping in the percentage
  14. Tip goes to
  15. How the Percentage Is Calculated
  16. The Tip Is a Line of the Order
  17. A Donation Form with a Tip
  18. The Live Display
  19. Multi-Page and AJAX Forms
  20. Conditional Logic
  21. Merge Tags
  22. Entries and Reports
  23. Accessibility and Phones
  24. Next to a Processing Fee
  25. Developer Filters
  26. Troubleshooting
  27. Frequently Asked Questions
  28. Which payment add-ons does it work with?
  29. Can I change the presets per form?
  30. Does it make requests to an outside service?
  31. Can the visitor change the tip after paying?
  32. Is a tip taxed or counted as a donation?
  33. What happens when my license expires?
  34. Add a tip in one tap

Video walkthrough

Gravity Forms Tip Field: Percentage Tips, Custom Amounts and a Tip Line in the Order Total
Watch: add percentage, fixed and custom tips to a Gravity Forms order total, step by step. Watch on YouTube

Tip Field adds one new field to Gravity Forms: Tip. It lets the visitor add a tip or gratuity to a payment form with one tap: percentage buttons such as 10, 15 and 20 percent of the order, fixed amounts, a custom amount, or no tip. The tip is a line of the order, like a shipping line, so the Total, the order summary, the entry, your notifications and every payment add-on that charges the Gravity Forms total include it. The buttons show what each tip comes to, for example 15% = $7.65, and they update while the visitor changes the cart.

A takeout order form with a pasta and a dessert, a tip field with the buttons 10 percent equals 5 dollars 10, 15 percent equals 7 dollars 65 selected and 20 percent equals 10 dollars 20, a custom amount and no tip, a note that the tip goes to the kitchen team and a total of 58 dollars 65
The buttons show what each tip comes to, and the Total follows the choice.

What You Get

  • One Tip field in the Pricing Fields group with up to six presets. Each preset is a percentage of the order total or a fixed amount, with an optional label and description.
  • A custom amount with its own label, a minimum and a maximum, a no tip choice, and a default selection.
  • A live amount on every percentage button and a live Total, also when the cart changes or a field is shown or hidden by conditional logic.
  • Five rounding options for percentage tips: nearest cent, up, down, nearest whole currency unit and up to the next whole unit.
  • The currency, the symbol and the number format come from your Gravity Forms currency setting.
  • An optional Tip goes to line under the choices.
  • Merge tags for the amount, the choice and the recipient, entry columns for the tip total and choice, and two filters for developers.
  • A real group of radio buttons: a fieldset with a legend, native keyboard arrows and a label on every input.
  • Works with AJAX forms, multi-page forms, conditional logic, the Orbital theme and legacy markup.
  • No outside requests from your forms. Everything is calculated on your own site.

Requirements

  • Gravity Forms 2.9 or newer (tested with 2.9 and 3.1), WordPress 6.5 or newer and PHP 7.4 or newer.
  • A form that has something to base the tip on: product fields, a donation amount, or any other pricing field. When the order total is zero no tip is added.

Installation

  1. Install and activate the add-on in the usual way.
  2. Open Forms → Settings → Tip Field, enter your license key and activate it.
  3. Edit a payment form and add Tip from the Pricing Fields group, below the products and before the Total field.

Add the Field

Add the Tip field after the fields that make up the order: products, options, shipping, a donation amount. The field has a label like any other field, which is also the name of its line in the order summary. A description and the Required setting work as usual. Required means the visitor must make a choice; with a no tip choice and a default selection this is already true for every visitor.

The Settings

Presets

The field starts with three presets, 10, 15 and 20 percent. Use Add a preset for up to six and the Remove link to delete one. Every preset has the following settings.

Setting What it does
Type Percent of the total, or a fixed amount.
Value The percentage (up to 100) or the amount. A comma is accepted as the decimal sign.
Label Optional. By default the button says the percentage, such as 15%, or the amount, such as $5.00. A label such as Great service replaces that text.
Description Optional small text under the button, for example Coffee for the cooks.

Rows with an empty or invalid value are ignored, so a half finished row never reaches the form.

Selected by default

Choose which button is selected when the form opens: one of the presets, the custom amount, no tip, or nothing. Most forms select the middle percentage. Leave it empty if you want the visitor to choose; then switch on Required.

Custom amount

Tick Offer a custom amount to add a choice that opens a box where the visitor types any amount. You can rename the choice and set a minimum and a maximum. The limits apply to the custom amount only, and an empty limit means no limit. The hint under the box says what is allowed, for example Between $1.00 and $50.00. An amount outside the limits, zero or text that is not a number shows a message under the box straight away and is refused again by the server.

The tip field with the custom amount selected, the amount 60 typed in the box, the hint Between 1 dollar and 50 dollars and a message that the tip can be at most 50 dollars
A custom amount has its own minimum and maximum, and the visitor is told at once.

No tip

Tick Offer no tip for a choice that adds nothing. It records the visitor decision in the entry, which is useful when you report how many visitors tip.

Rounding

Percentages rarely come out in whole cents. Choose how the result is rounded. The example is 12.5 percent of $51.00, which is $6.375.

Option Result for the example
Nearest cent $6.38 (half rounds up)
Up to the next cent $6.38
Down to the cent $6.37
Nearest whole currency unit $6.00
Up to the next whole currency unit $7.00

Fixed amounts are never rounded to whole units. In a currency without decimals, such as the Japanese yen, the cent options and the whole unit options give the same result.

Show the amount next to each percentage

When this is ticked the button says 15% = $7.65. Fixed amounts need no equation and show only the amount. A preset with a label of your own shows the label, an equals sign and the amount.

Do not count shipping in the percentage

By default the percentage is taken from the Gravity Forms total before the tip, which includes shipping. Tick the box to leave shipping out. A restaurant that delivers may prefer to tip on the food only.

Tip goes to

A short line such as the kitchen team is shown under the choices as Tip goes to: the kitchen team. It is also available as a merge tag. Leave it empty to show nothing.

How the Percentage Is Calculated

The base of a percentage is the form total before the tip, after discounts. In the example below a visitor orders two plates of pasta at $18.00 and one dessert at $9.00, with $6.00 delivery.

Step Amount
Products: 2 x $18.00 and 1 x $9.00 $45.00
Delivery $6.00
Base for the tip $51.00
10%, 15% and 20% $5.10, $7.65 and $10.20
Total with 15% $58.65
Base without shipping, then 15% $45.00, then $6.75

Discounts reduce the base: a ten percent member discount comes off first and the tip is taken from what remains. A fixed amount preset does not depend on the base. When nothing is ordered the base is zero and no tip line is added, whichever button is selected.

The Tip Is a Line of the Order

This is the part that makes the field work with payment add-ons. The tip is added to the order as a product line named after the field, in the same place where Gravity Forms builds the order, before any payment feed runs. A payment add-on that charges the Gravity Forms total charges the total with the tip. A payment add-on that sends the order lines to its provider sends the tip as a line too.

We checked the amounts a payment add-on receives, with the Gravity Forms payment framework: the payment amount equals the Total, and the line items are the products, the delivery and the tip. The same order is in the entry order summary, in the all_fields merge tag and in your notifications.

The entry detail of a takeout order with the order summary listing the pasta, the dessert, the delivery and a Tip line of 7 dollars 65 and a total of 58 dollars 65
In the entry the tip is a line of the order summary, like shipping.

The value saved in the field is the tip amount as a plain number, such as 7.65, and it is empty when there is no tip. Exports, feeds and other add-ons therefore get a number. The amount is fixed at the moment the entry is saved: if you later edit a product in the entry, the tip that was charged stays as it was.

A Donation Form with a Tip

The same field works on a donation form. Use a Product field with a user defined price for the donation amount, add the Tip field and keep the presets at 5, 10 and 15 percent. The visitor gives 100 dollars, taps 10 percent and the form total becomes 110 dollars. If your organisation covers a part of its costs with such a contribution, change the label to something like Support our work and set the Tip goes to line to say what it is used for.

The Live Display

The page does the arithmetic while the visitor fills in the form. When a quantity, a choice or a donation amount changes, the buttons show the new amounts and the Total follows. The screen script uses the same steps as the server, and the server always recalculates when the form is sent, so the amount charged is the amount from the server.

  • A custom amount is checked as it is typed. A message and the invalid state are set on the box for screen readers.
  • If conditional logic hides the Tip field, its amount leaves the Total at once and the server adds nothing.
  • The field does not read the page of a payment add-on: it sits in the Gravity Forms total, which those add-ons already read.

Multi-Page and AJAX Forms

The Tip field can sit on any page. On the page where it is shown, the buttons are based on the products chosen on the pages before it, and when the visitor goes back and changes the quantity the amounts follow. The selected button is kept when the form comes back after a validation message, also with AJAX.

Conditional Logic

Conditional logic can show the Tip field only when it makes sense, for example for Dine in but not for Takeout. When the field is hidden its line is not in the order. You can also use the value of other fields in the form to show different Tip fields, each with its own presets, for different kinds of order.

Merge Tags

Use these in notifications and confirmations. Replace Tip and 5 with the label and the id of your field.

<p>New order from {Your name:1}</p>
{all_fields}
<p>Tip: {tip_amount} ({tip_choice})</p>
<p>Tip goes to: {tip_goes_to}</p>
<p>Tip as a number: {tip_amount:price}</p>
<p>The Tip field itself: {Tip:5}</p>
Merge tag Result
tip_amount The tip total of the entry as money, such as $7.65.
tip_amount:price The tip as a plain number, such as 7.65.
tip_choice What the visitor chose, such as 15%, Custom amount or No tip.
tip_goes_to The text of the Tip goes to setting.
Tip:5 The Tip field value as money. Add :price for a number.

In the form editor the merge tag list has entries for the three global tags. In a form with two Tip fields the total and the first note are used for the global tags.

Entries and Reports

  • The entry detail shows the Tip line in the order summary and the amount in the field.
  • The entries list can show the columns Tip total and Tip choice, and you can filter by them.
  • An export contains the plain number of the field and the two columns.

Accessibility and Phones

  • The choices are native radio buttons in a fieldset with a legend, so screen readers announce the group name and the number of choices, and the arrow keys move between them.
  • Every radio button and the custom box have a visible label. The hint and the message of the custom box are tied to it.
  • The selected choice has a border and a tinted background, not only a colour change, and the focus ring is always visible.
  • On phones the buttons stack at full width with tap targets of at least 44 pixels, and the page does not scroll sideways.

Next to a Processing Fee

If you also use the Processing Fee Recovery add-on from GravityExtra, put its fee field after the Tip field. The tip is added first, so the fee is calculated on the total including the tip, which is what the payment provider charges you for.

Developer Filters

Filter What it changes
gfxtip_base The amount a percentage is taken from, per field. Arguments: the base, the field, the form and the entry.
gfxtip_amount The tip of a field before it is added to the order. Arguments: the amount, the field, the form and the entry.
// Never tip on more than the food: take the delivery and a service charge out of the base.
add_filter( 'gfxtip_base', function ( $base, $field, $form, $entry ) {
    return max( 0, $base - 3.5 );
}, 10, 4 );

// Cap every tip at 40.
add_filter( 'gfxtip_amount', function ( $amount, $field, $form, $entry ) {
    return min( $amount, 40 );
}, 10, 4 );

The live display in the browser uses the settings of the field, so a filter changes what is charged but not the preview. Use the filters for rules that the visitor does not need to see, or show the rule in the description of the field.

Troubleshooting

Problem Check
The Tip field is not on the form The license key must be active. Without it the field is left out of the form and no tip is charged.
The buttons show $0.00 No order yet: choose a product or enter an amount. Percentages need a total above zero.
The tip is missing from the payment Check that the payment feed uses the form total or the product fields, and that the Tip field is visible for that entry.
The tip changed after I edited the entry It does not: the amount charged is saved when the entry is created. Create a new entry for a new amount.
A percentage is off by a cent Look at the Rounding setting. Nearest cent rounds halves up; the other options always round in one direction.
The custom box does not show Tick Offer a custom amount, and select the custom choice: the box opens when that choice is selected.

Frequently Asked Questions

Which payment add-ons does it work with?

Any add-on that charges the Gravity Forms total or reads the product lines of the order. The tip is part of both before the payment feed runs.

Can I change the presets per form?

Yes. Every Tip field has its own presets, limits and rounding, and you can use several Tip fields with conditional logic.

Does it make requests to an outside service?

Not from your forms. The tip is calculated on your own site, in the browser and on your server. Only the license check and the update check that every GravityExtra add-on has contact gravityextra.com.

Can the visitor change the tip after paying?

No. The tip is part of the entry that was paid.

Is a tip taxed or counted as a donation?

That depends on your country and your business. The add-on adds the amount to the order; ask your accountant how to treat it.

What happens when my license expires?

The Tip field is not shown and no tip is charged. Your forms, entries and the tips already saved stay as they are.

Add a tip in one tap

Percentage buttons, a custom amount and no tip, charged with the rest of the order by your payment add-on.

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