Gravity Wiz Weekly #190
You know the drill! Populate Anything 2.0, Gravity Perks 2.3, fresh styles for List field buttons, the power of Scoped Inventory, and a batch of new Gravity Forms snippets.
Greetings, wizards!
Four Steps for an Epic Newsletter:
- Kick off with a major announcement (like Populate Anything 2.0).
- Next, have the founder share some of his favorite weekly updates.
- Then, highlight what a real customer (like Kory R.) is doing with your product.
- Lastly, hit your audience with some awesome free resources!
Ok, I understand the assignment. Letβs do this! β
Populate Anything 2.0
Over the years, you all have pushed Populate Anything to accomplish things we hadnβt even considered when we created this Swiss Army plugin. But weβve worked together and iteratively improved and enhanced this beast to live up to its name.
With 2.0, we leaned on the invaluable insights weβve gained over the last five years of developing this perk to dramatically improve the performance of complex configurations and the way Populate Anything interacts with other popular 3rd-party plugins like GravityView and Gravity Flow.
These changes resulted in the largest refactor of any perk to date while paving the way for more efficient and reliable future development β like the tight integration with our upcoming perk: GP Advanced Select!
Get the full scoop in the release post. π
Changelog Highlights
Gravity Perks 2.3
A rare update for the Gravity Perks plugin! Version 2.3 brings support for βupdate channels.β This is the mechanism that is allowing us to publish Populate Anything 2.0 to new installs and Populate Anything 1.2.x to existing installs.
If youβre planning on using Populate Anything 2.0, be sure to update Gravity Perks as well.
File Renamer
File Renamer makes renaming uploaded files a breeze. Just specify your naming template on the File Upload field and this perk handles the rest.
This week, weβve added support for renaming new files uploaded when editing an entry with GravityView.
PS β If youβre looking for an ensuite option for editing entries on the frontend, check out Entry Blocks.
Entry Blocks
Speaking of Entry Blocks, we did some housekeeping this week and added inline documentation for all of its many hooks. For a full list, check out Entry Blocksβ Hooks section.
Weβre still very much committed to the WordPress way β hyperextensible code for maximum flexibility. π οΈ
Spotlight: How scoped inventory can simplify complex booking forms
Kory Richardson found himself jumping through hoops (and a few different solutions) searching for a way to have more than one form, with unique configurations and time-dependent price points, to flow booking reservations back to one calendar β and that is, without performing βsome complex mathematical calculations.β π
The solution? Gravity Forms Inventory.
βBy using a drop-down field, and Inventory, 2 different services, at 3 base price points could be synced across two forms. It is great!β
New Resources
Fresh Styles | Use Labels for List Field Buttons
By default, the List field uses some tasteful plus/minus icons for its add/remove buttons. We had a Pro customer reach out after his older userbase was having trouble understanding how to interact with these fields.
We did some exploring and found that Gravity Forms actually has text labels for these buttons that are hidden via CSS. That means we can use a bit of CSS to show them and hide the icons instead. Enjoy!
New Snippet | Disable Inventory Limits After a Specific Date
Another Pro customer needed to prevent players from registering for more than two leagues at once when their leagueβs registration opens. But β after a specific date, when everyone has had a chance to register for the leagues they want, they want to lift that registration limit so any user can fill up any remaining spots.
This snippet helps by allowing the league inventory to be limited by 2 per user and then disabling that restriction after a specified date. π
Populate Anything 2.0 Snippet Updates
Populate Anything 2.0 introduces a breaking change for some snippets. These relied on having access to all results that matched configured filters when populating field values. For performance, in 2.0, only the first result will be returned, since, by default, only the first result will be populated.
Not to worry though! Weβve updated all of these snippets to work around that limitation. If youβre using one, grab the latest version below (even if youβre still on Populate Anything 1.2.x) and when youβre ready to upgrade, youβll be golden.
Gravity Perks
Gravity Perks (v2.3)
- Added support for legacy version channels.
- Fixed a typo in an error message.
GP Address Autocomplete (v1.2.13)
- Added new
gpaa_prevent_browser_autocomplete
JavaScript filter. - Fixed issue where browser autocomplete would still be enabled for other inputs in an address field such as “Address Line 2.”
GP Advanced Save & Continue (v1.0.8)
- Fixed issue where the Advanced Save and Continue UI would be displayed on the GravityView edit entry view.
GP Conditional Pricing (v1.4.6)
- Fixed PHP 8 warnings.
GP Entry Blocks (v1.0-alpha-2.21)
- Added missing inline documentation for all hooks.
- Fixed a conflict concerning notifications if using Gravity Forms Utility by @gravityplus.
GP File Renamer (v1.0.5)
- Added
$form
and$field
parameters to thegpfr_filename
filter. - Added support for renaming files during
gform_after_update_entry
, which improves compatibility with GravityView.
GP File Upload Pro (v1.3.10)
- Improved support for cropping WebP images. If the browser does not support exporting
<canvas>
‘s as WebP’s, the WebP image will be treated as a non-image file.
GP Inventory (v1.0-beta-3.21)
- Updated the functionality that checks for paid entries before decrementing inventory to also work with WooCommerce Gravity Forms Product Add-ons’ “Update Payment and Transaction Details” setting.
- Fixed issue where entered quantities of
0
were treated as1
. - Fixed issue where shared resources with different quantity fields were not tracked properly.
GP Page Transitions (v1.0.13)
- Fixed an issue where forms with Page Transitions enabled but Soft Validation disabled would not work correctly in some cases if using Next Button Conditional Logic.
GP Populate Anything (v2.0) β Release Post!
- Improved performance by skipping the loading of object type properties during query if an object type supports it.
- Improved performance of Field Value Objects.
- Improved performance of value population by only querying for one object. If you are needing to get all objects when populating values (e.g. comma-separated list inside a value), use gppa_query_all_value_objects.
- Improved performance when using Populate Anything with GravityView.
- Improved performance when using Populate Anything with Gravity Flow.
- Improved security of Live Merge Tags by running wp_kses_post on the output of Live Merge Tags. This can be removed by using
remove_filter( 'gppa_live_merge_tag_value', 'wp_kses_post' );
. - Removed various methods that duplicated logic in other methods.
- Refactored method names internally to drop the term hydrate in favor of populate. Existing methods were kept and deprecated for backwards compatibility.
- Added new gppa_bypass_populate_form PHP filter hook.
- Added new gppa_query_all_value_objects PHP filter hook.
- Fixed a variety of PHP warnings/notices.
- Fixed an issue with live merge tags having a fallback with forward slash not working.
GP Unique ID (v1.4.14)
- Added support for Unique ID field to be editable with GravityView Inline Edit.
The snippet for list filed labels is creating an error for me:
syntax error, unexpected ‘.’, expecting end of file
Thx
Actually, forget that comment, as I see it’s all css.
Thanks!
But I still don’t see how to actually edit the buttons with text…
Hi Scot,
That looks like a PHP error to me. The snippet should be added to your theme’s
style.css
file.This snippet doesn’t let you edit the Add/Remove text. It only replaces the icons with the default text that is normally hidden.
If you’re a Gravity Perks subscriber, we’ll be happy to look into what it would take to add support for this in the snippet. Drop us a line in Support.