Hi jcrea, you are correct and this is definitely a bug. Gravity Forms is going to be adding most of this plugins functionality to core in the near(ish) future so while we’re fixing small bugs were not fixing everything.
Here’s an alternate solution as a stop-gap.
1. Enable “Allow field to be dynamically populated” option for the Tax field.
2. Add “default_term” as parameter name: http://grab.by/MIE4
3. Copy and paste this code into your theme’s *functions.php* file:
add_filter( ‘gform_field_value_default_term’, function() {
return 444;
} );
4. Update “444” to the term ID of the term you wish to set as the default.
Thread Starter
jcrea
(@jcrea)
Thanks David for this, however, what if I have multiple forms that each need a different default term or a form that has multiple taxonomies each with a different default term?
Thanks.
Here’s an alternate version that allows you to specify a different default value per field ID:
http://pastie.org/private/eqs3xt1vugtjbo4ozkpug
Thread Starter
jcrea
(@jcrea)
Thanks again David.
One more question.
If you have multiple forms, how can you distinguish between which form gets the value applied?
The $field object also has a formId property. You can check for a specific form and field like so:
http://pastie.org/private/g9mztt7nhlxvr3cgoo2sza