Skip to content

Instantly share code, notes, and snippets.

@tradesouthwest
Created August 8, 2018 18:18
Show Gist options
  • Save tradesouthwest/d3da7450bd164f7a4c5d275132cb8aa5 to your computer and use it in GitHub Desktop.
Save tradesouthwest/d3da7450bd164f7a4c5d275132cb8aa5 to your computer and use it in GitHub Desktop.
Gravity Forms PDF generator - hide any items that have a CSS class of "exclude."
<?php
foreach ( $form_data['products'] as $id => $prod ):
if ( strpos( $fields[ $id ]['cssClass'], 'exclude' ) & $year !== false ) {
continue;
}
?>
//I need to be able to write it with and & condition something like this...
<?php foreach ( $form_data['products'] as $id => $prod ):
if ( strpos( $fields[ $id ]['cssClass'], 'exclude' & $yearmodel='2019') !== false ) {
continue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment