AI Verified

Name

Gravity Forms: Exclude fields with visibility hidden from {all_fields} merge tag with :nohidden modifier

About

This example extends the default nohidden modifier to also exclude fields with the visibility setting set to hidden.

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

Abundant-Designs

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://www.abundantdesigns.com

History

Last modified:

07/04/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Gravity Forms: Exclude fields with visibility hidden from {all_fields} merge tag with :nohidden modifier

 
                    
1add_filter( 'gform_merge_tag_filter', function ( $value, $merge_tag, $modifier, $field, $raw_value, $format ) {
2 if ( $merge_tag == 'all_fields' && $modifier == 'nohidden' && ( $field->type == 'hidden' || $field->visibility == 'hidden' ) ) {
3 return false;
4 }
5 
6 return $value;
7}, 10, 6 );

0

Related Snippets

Please see some snippets below related to this snippet..

General

Unverified

0

Remove Unused Javascript

Added: 1 year ago

Last Updated: 11 months ago

Remove Unused Javascript - and improve your Page Speed Insight Score

General

AI Verified

0

Remove Private Title

Added: 3 months ago

Last Updated: 3 months ago

General

Unverified

1

Apple-Mobile-Menu

Added: 6 months ago

Last Updated: 6 months ago

This is how to add a Mobile Menu like the Apple Website with the use of stacked containers with IDs to control navigation and what is shown/hidden. This should be added to HTML.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

General

AI Verified

General

AI Verified

1

Create [year] Shortcode to Display Current Year

Added: 1 year ago

Last Updated: 1 week ago

WooCommerce

Unverified