Comments (5)
Just an update that I achieved the desired functionality by using this:
add_action("gform_after_submission_1", "my_after_submit_function", 10, 2);
to run this:
pods_api()->save_pod_item($params);
after the form submission.
Thanks again for the great tool.
from pods-gravity-forms.
@GitHubGreg So does this allow to submit more than two ACTs? And what is the whole code you used exactly in your functions.php?
from pods-gravity-forms.
@naomicbush Any ideas on how to make this happen? Submitting a gravity for to more than one Pod?
from pods-gravity-forms.
Hi @schutzsmith. As per my previous post, I was able to create two pod items through one gravityform submission by using the Gform_after_submission hook (explained here http://www.gravityhelp.com/documentation/page/Gform_after_submission).
Here is the code:
function after_customer_submit($entry, $form){
//Create new 'Customer' Pod item
$params = array(
'pod' => 'customer',
'is_new_item' => 'true',
'bypass_helpers' => 'true',
'data' => array(
'first_name' => $first_name,
'last_name' => $last_name,
),
);
$the_created_customer_id = pods_api()->save_pod_item($params);
//Create new 'Pet' Pod item
$params = array(
'pod' => 'pet',
'is_new_item' => 'true',
'bypass_helpers' => 'true',
'data' => array(
'pet_name' => $pet_name,
),
);
$the_created_pet_id = pods_api()->save_pod_item($params);
}
add_action("gform_after_submission_1", "after_customer_submit", 10, 2);
In the above function I created two pod items (customer and pet) but you can create however many pod items within the function based on whatever gravityform fields you want.
Hope this helps.
from pods-gravity-forms.
@GitHubGreg awesome! I'll try that! Thank you so much
from pods-gravity-forms.
Related Issues (20)
- --Select One-- displaying in Pods linked Gravity Form field HOT 6
- Pods Gravity Form Not Saving HOT 1
- Pods Gravity Form Not Saving - Still open issue
- Issue with Pods GF add-on hooks for updating form entry
- Using pods-gravity-forms to create new PODs post corrupts taxonomy value HOT 1
- Number and Currency fields not showing HOT 1
- pods addon form settings UI is messed up in GF 2.5 HOT 1
- Two identical posts are generated at once with GF 2.5.x HOT 21
- Gravity Flow Form hangs when submitting user input during workflow process HOT 1
- Pods feed mapping UI is not rendering correctly HOT 2
- Limit list to the same Post Author in Relationship fields has no effect in GF
- Strange Issue HOT 1
- Image from Gravity Form is not saved in Pod Image using the Pods Gravity Form Add-on
- Copies of the image being uploaded to media library when the form entry is resubmitted
- Fatal Error using PHP8 HOT 1
- Data-type matching not clear
- Markdown option results in critical error HOT 1
- [wpvc] The plugin hasn't been tested with the latest version of WordPress
- Dropdown menu items reset by Pods Gravity Forms HOT 4
- [wpvc] The plugin hasn't been tested with the latest version of WordPress
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pods-gravity-forms.