Hi Shane,
This is from Gravity support:
Gravity Forms doesn't provide any built-in merge tag to get a taxonomy term. If I understood correctly, you just want to be able to include the output that would generate the shortcode provided by Toolset support as part of the form values in your notification, right?
If so, you could do the following:
1. Add a Hidden field to your form.
2. Use the following filter to return the output of the shortcode to your field: hidden link
The following should work:
add_filter( 'gform_save_field_value_xx_yy', function ( $value, $lead, $field, $form ) {
$value = do_shortcode( '[wpv-post-taxonomy type="location" format="name" show="name" ]' );
return $value;
}, 10, 4 );
You need to replace xx in the first line of the snippet with your form id and yy with the id of your hidden field.
I added this in to the functions.php
/*Gravity form available space add location to form*/
add_filter( 'gform_save_field_value_43_10', function ( $value, $lead, $field, $form ) {
$value = do_shortcode( '[wpv-post-taxonomy type="location" format="name" show="name" ]' );
return $value;
}, 10, 4 );
But it’s not working for some reason
We was able to pull in another toolset field ‘Space ID’ using {custom_field:wpcf-id} but this isn’t a taxonomy field -
hidden link
This worked.
Any other ideas how we can get the taxonomy to show?
Thanks