GWW 318: Required Reading

Teach a field to require itself, conditionally. Plus, create QR codes that dial a phone number for you, and learn to calculate someone’s age on any date.

Greetings, wizards!

Quick brag before we get into it: Spam Hexer has quietly hexed 11,384 spam submissions in the last 30 days on our website. That’s over 11,000 junk entries that never touched our inbox, our database, or our sanity. Hexcellent! 🤙

This week we’ve got a snippet for making fields optionally required, a clever QR-code trick for quick calls, and a formula that finally answers “how old will they be on the big day?”

Let’s dig in!

Top Picks: Product Updates

GP Inventory
Easy, flexible inventory management for Gravity Forms.

Missed this one last week: If you manage stock across a lot of choices, you may find it tiresome to click into each Inventory input and specify the value. So we added support for setting inventory in bulk via Gravity Forms’ own Bulk Choice Editor. 👌

GP Bookings
Turn Gravity Forms into your complete WordPress booking platform.

Pricing just got even more flexible. Two new filters — gpb_service_pricing_rules and gpb_resource_pricing_rules — let you adjust booking prices right at the moment they’re calculated. These hooks are perfect for those complex business rules that UIs can never quite handle. Hook it up! 🪝

GP Advanced Conditional Logic
Powerful conditional logic with and/or groups, date and time rules, user-aware logic, and more.

Conditional logic now plays nicely with Submit Buttons. Show or hide your Submit Button based on anything happening elsewhere in the form — great for gating submission until the right conditions are met. And when it comes to powerful conditions, GPACL brings the heat. 🌶️

Pro Tip: Auto Call on QR Scan

Here’s a slick one straight from support. You can generate a QR code that, when scanned, doesn’t just open a link — it dials a phone number automatically.

Encode a tel: link into your QR code and a quick scan launches the caller’s phone dialer, ready to ring. Perfect for print materials, event badges, or storefront signage where you want folks to reach you in one tap. 📱

# Basic Setup
[gpqr]tel:{Phone B:2}[/gpqr]

# Include a manual extension
[gpqr]tel:{Phone B:2},,12345[/gpqr]

# Include extension by field value
[gpqr]tel:{Phone B:2},,{Ext:3}[/gpqr]

How To: Calculate Age on a Specific Date

Calculating someone’s age today is easy. But what about their age on a specific future or past date — eligibility for an event, a benefit, a milestone birthday? With Advanced Calculations, it’s one tidy formula.

Resourcerous: Require Fields Conditionally

Make fields required on the fly based on what someone selects in a control field — flip a set of fields to required (and back) depending on the value of the control field. The required indicator is updated live and enforced on submission.

Join Saif for a video walkthrough of this snippet in action!

From the Community

Community member, Gui Lamu, reached out to remind me that he actually developed a free plugin that does exactly this — with a proper UI and even more flexibility for the conditions. Check it out!

Video: Paywall Premium Content with Gravity Forms

Lock your best content behind a form and let submissions be the key. This walkthrough shows how to paywall premium content with Gravity Forms — great for lead magnets, gated resources, and members-only material.

Product Updates

Gravity Perks

GP Advanced Conditional Logic (1.0-beta-1.4)

  • Fixed an issue with Conditional Logic not displaying correctly for Submit Button.

GP Bookings (1.0-beta-2.11)

  • Added gpb_service_pricing_rules and gpb_resource_pricing_rules filters to allow pricing rules to be modified at calculation time.
  • Fixed an issue where editing an entry via GP Entry Blocks would not correctly update Booking entry metadata.
  • Fixed issue where editing a Booking via GP Entry Blocks would create a new booking instead of updating the existing one.
  • Fixed issue where using GP Entry Blocks to edit entries with a booking would fail form validation.
  • Fixed issue where resource-backed bookings were counted twice against union-mode capacity.
  • Fixed an issue where some admin UI strings were not translatable.
  • Fixed issue where nightly buffer periods were not reflected in calendar availability.

GP Media Library (v1.2.40)

  • Fixed issue where editing a post via Advanced Post Creation removed previously uploaded images from a mapped ACF gallery field, keeping only the newly added images.

Gravity Connect

GC Notion (v1.0.13)

  • Fixed issue where long Notion rich text property values could exceed the Notion API character limit.

Gravity Shop

GS Product Configurator (v1.0.2)

  • Fixed issue where a fatal error occurred when a non-product value (such as a product slug) was passed to the product form lookup.

Free Plugins

Spellbook (v3.0.28)

  • Fixed issue where perk field settings displayed incorrectly in the form editor with Gravity Forms 3.0 due to Spellbook’s admin styles no longer being enqueued.

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.