Gravity Wiz Weekly 233

Compare Date fields with Conditional Logic Dates, view uploaded files with Preview Submission, block out date ranges in Gravity Forms, and more spicy highlights.

Greetings, wizards!

At Gravity Wiz, we do twice-yearly internal reviews to ensure we’ve living up to our greatest wizarding potential. We’re just completing the mid-year cycle now and it’s sparked some really great insights about the work we’re doing and ways we can improve. 🙌

It feels great to be working with such a legendary team! Their raw talent and sorcerous consistency is the reason I have so many awesome things to share with you in this newsletter each week. 🤗

Let’s jump in!

Highlights of the Week

Conditional Logic Dates: Compare Date Fields

Make anything conditional based on dates and time. Compare based on static dates, relative dates, specific days of the week, and wildcards for flexible date targeting.

You can now compare Date fields with other Date fields when you combine Conditional Logic Dates with our free Field to Field Conditional Logic plugin! This is useful for things like:

  • Displaying a warning if a claim date does not fall within the warranty period.
  • Conditionally revealing an explanation field if an online assignment is turned in after its due date.
  • Prompting users to purchase travel insurance if their travel dates fall outside of their current insurance coverage period.

Here’s a quick demo of what that could look like on your forms:

compare date fields with gravity forms conditional logic dates

Preview Submission: View Uploaded Files

Let users preview their submission before they click submit, improving accuracy and increasing conversions through confidence.

We fixed an issue this week where the displayed filenames weren’t correct when using PHP8+. Here’s what that looks like with the {all_fields} merge tag.

gallery submission example with preview submission

If you want to spice things up further, you can actually display uploaded files using our Multi-file Merge Tag snippet.

finished gallery submission example in gravity forms

Terms of Service: Conditional Improvement

Add a Terms of Service field to your form with a click, plus require the user to scroll through full terms before confirming their agreement by checkbox.

This week, we improved support for using conditional logic in combination with the Terms of Service field. This makes it possible to reveal fields (or the submit button) reliably when the Terms of Service checkbox is clicked.

conditional improvement with terms of service

PS – Any interest in getting Terms of Service’s bells and whistles on Gravity Forms’ Consent field? Asking for a friend.

Resources

Advanced Merge Tags: Target Selected Checkboxes

What You’re Trying to Do: Imagine you’re using Limit Checkboxes to require the user to select exactly three exercises they want to learn as part of their personal training program. After submission, you want to create a stylish, personalized summary of the program.

What Won’t Work: If you just wanted to dump out the selected checkboxes, you could use the field-level merge tag (e.g. {Exercises:1}). That will return all Checkboxes but you’re locked into the default output, no fancy styles. If you use the input-specific merge (e.g. {Exercises:1.1}), it would only return a value if it was checked so you’d have a bunch of empty lines for unselected exercises. What you really need is a way to target the selected checkboxes by index.

The Solution: Our Advanced Merge Tags snippet now supports the :selected modifier for targeting selected checkboxes by their 0-based index. For example, to target the first selected checkbox you would use: {Exercises:1:selected[0]}. To target the second selected checkbox, just change that 0 to a 1, and so on.

Here’s what it might look like in action:

target selected checkboxes with advanced merge tags

Cache Buster: Access Embed Post

Bypass even the most aggressive WordPress caching plugins for the freshest forms.

Cache Buster loads the form directly from the server via an AJAX request. This means that the “context” of the form isn’t the actual page it is being displayed on but rather the “admin” request that fetches it.

This week, you’ll find that the display page context is correctly preserved for the{embed_url} and {embed_post} merge tags. 👏

How to Block Out Date Ranges in Gravity Forms

Next up in our Quick Tips to Perfect Your Gravity Forms Datepicker series:

Product Updates

Gravity Perks (v2.3.8)

  • Fixed issue where the plugin updater API response for perks included the changelog property, which could prevent plugin updates from showing up in some situations.

GS Product Configurator (1.0-beta-2.12)

  • Added format argument to gspc_addon_display_value hook.
  • Fixed issue where delayed feeds were not handled for entries if their associated WooCommerce Order did not first pass through the Processing status.

GF Code Chest (v1.0.4)

  • Added Parsedown as a dependency.
  • Fixed issue with gform_post_save_feed_settings hook callback that potentially breaks other plugins.
  • Removed php-scoper in favor of jetpack-autoloader.

GF OpenAI (1.0-beta-1.12)

  • Updated the OpenAI model selection for Chat Completions to be gpt-4ogpt-4-turbo, and gpt-3.5-turbo.

GP Advanced Calculations (v1.0.23)

  • Fixed issue where values starting with 0 could get evaluated as octals.

GP Advanced Save and Continue (v1.0.20)

  • Improved user experience by removing the gpasc_new_draft query parameter on page load to avoid loading new drafts on redirects.

GP Conditional Logic Dates (v1.2.18)

GP Entry Blocks (1.0-beta-1.6)

  • Improved how we handle escaping merge tags in Edit Forms to prevent merge tag replacement conflicts when merge tag replacement happens in parent blocks.

GP Google Sheets (v1.1.19)

  • Fixed issue where Checkbox field choices with values of 0 were not written to Google Sheets.
  • Fixed potential issues where column mappings would be incorrectly read on a spreadsheet with multiple sheets using similar mappings. This didn’t impact writing, but would impact the feed settings.

GP Limit Dates (v1.1.26)

  • Updated Inline Datepicker to only trigger conditional logic if it is visible.

GP Notification Scheduler (v1.3.9)

  • Fixed issue where Notification Scheduler’s settings would not be visible when creating new notifications.

GP Preview Submission (v1.3.18)

  • Fixed issue where File Upload fields could show the temporary file name with PHP 8 instead of the actual file name when using {all_fields}.

GP Terms of Service (v1.4.6)

  • Updated require call to use plugin_dir_path().
  • Fixed issue where the checkbox for Terms of Service could be switched to disabled after a validation failure which could then cause form submission to fail if there is conditional logic that depends on the Terms of Service field.

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.

"I unsubscribe from every newsletter I get except yours."

Join 25,000 readers and be the first to know of legendary discounts, new releases, free snippets, and other secret sorcery!