I came up with a solution that will work without having to build out an entire confirmation via PHP. This won't work for everyone's situation, but since I did build out my own function/shortcode, it works for me.
I added the conditional logic to my shortcode and removed the GF shortcode altogether. To do so, I added merge_tag and value parameters like so:
[useful-tools type="documents" desc="true" merge_tag="{:3:value}" value="B"]
For those that want to see my shortcode, I'm including it here. It is set up to list all custom post types matching a custom taxonomy. It can also be used to list them outside of GF by removing the parameters.
function useful_tools_list($atts){
$atts = shortcode_atts(
array(
'type' => '',
'desc' => '',
'ul' => '',
'li' => '',
'merge_tag' => '',
'value' => '',
),
$atts
);
$results = '';
if (($atts['merge_tag']) && (!preg_match('/\b'.$atts['value'].'\b/', $atts['merge_tag']))) {
$results .= '';
} else {
$all_terms = get_terms('types');
foreach($all_terms as $term) {
wp_reset_query();
if (($atts['type']) && ($atts['type'] != "")) {
$args = array('post_type' => 'useful-tools',
'tax_query' => array(
array(
'taxonomy' => 'types',
'field' => 'slug',
'terms' => $term->slug,
),
),
'types' => $atts['type'],
);
} else {
$args = array('post_type' => 'useful-tools',
'tax_query' => array(
array(
'taxonomy' => 'types',
'field' => 'slug',
'terms' => $term->slug,
),
),
);
}
$loop = new WP_Query($args);
if($loop->have_posts()) {
if ((!$atts['type']) || ($atts['type'] == "")) {
$results .= '<h2>'.$term->name.'</h2>';
}
if (($atts['ul']) && ($atts['ul'] == "true")) {
$results .= '<ul class="tools-type-ul">';
}
while($loop->have_posts()) : $loop->the_post();
$postID = get_the_ID();
$desc = '';
$actualDesc = get_post_meta($postID, '_post_desc', true);
if ($atts['desc'] == 'true' && $actualDesc != '') {
$desc = ' - '.get_post_meta($postID, '_post_desc', true);
}
if (($atts['li']) && ($atts['li'] == "true")) {
$results .= '<li><a href="'.get_post_meta($postID, '_post_url', true).'">'.get_the_title().'</a>'.$desc.'</li>';
} else {
$results .= '<a href="'.get_post_meta($postID, '_post_url', true).'">'.get_the_title().'</a>'.$desc.'<br>';
}
endwhile;
if (($atts['ul']) && ($atts['ul'] == "true")) {
$results .= '</ul>';
}
}
}
}
return $results;
}
add_shortcode('useful-tools', 'useful_tools_list');