Closed garypaul closed 6 years ago
Is there a specific action we should add, or do we just add it and Gravity Flow adds support for the action?
@sc0ttkclark the standard way to handle this is the process_feed function. But Pods GF has always done things its own way, which I understand since there was no Add-On Framework when you first built it :-)
The integration requires extending the Gravity_Flow_Step_Feed_Add_On class like this.
As the add-on doesn't have a process_feed method it would need defining in the step class.
The intercept_submission method may also need overriding in the step with a way to prevent the selected feeds being processed during the original form submission.
The class could be included here or in Gravity Flow.
or, you could go ahead and create a step like @richardW8k has mentioned (and was requested in #93) .
But the very least you need to allow other plugins like Gravity Flow "the opportunity to trigger the feed at a specific point in time" is the process_feed
function.
And once you add (and use) the process_feed
function to handle all of the processing, you can allow conditional logic on the feed (as the original poster requested) by adding a feed_condition
field to the feed settings fields.
We're now utilizing the process_feed functionality for Pods GF.
Fixed in #86 (ZIP: https://github.com/pods-framework/pods-gravity-forms/archive/feature/skc-fixes.zip)
Issue Overview
Currently, there isn't a way to conditionally trigger a Pods feed to run. For example, if a form isn't completely filled out or some element doesn't match a specific value. Right now, the Feed will ALWAYS run. This would be similar perhaps to how the MailChimp feed works.
Expected Behavior
If { condition } then run feed.
Current Behavior
Currently, when you submit a form ( the Pods feed will ALWAYS run ). Plugins like Gravity Flow which add workflow steps don't have the opportunity to trigger the feed at a specific point in time.
Possible Solution
Either provide a way to trigger a feed ( in code ) or add conditional statements that another plugin can manipulate to run the feed at a specific time... or after a specific event.
Steps to Reproduce (for bugs)
Pods Package Export