This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @author David Smith <david@gravitywiz.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get the count on the repeater field | |
// mabye use get_sub_field() instead of get_field() if it's nested | |
$count = count( get_sub_field( 'the_field' ) ); | |
// begin $count conditions | |
if ( $count > 1 ) { ?> | |
// greater than 1 | |
<?php the_field( 'great_than_1' ); ?> | |
<?php } else { ?> |