Using Pods Gravity Forms Add-On to Edit a Specific ID
Using specific filters, you can load a specific id into a Gravity Form with a Pods Feed established even if the form is not embedded on the Post
Using specific filters, you can load a specific id into a Gravity Form with a Pods Feed established even if the form is not embedded on the Post
Need to change the behavior of the Pods Gravity Forms Add-on? Use this list of filters to perform different functions, including loading specific records to be edited or populating fields based on specific IDs.
Dynamically populating a Gravity Form field without creating a Pods Feed for the form.
Modify what is displayed in the pulldown lists for the dynamic lists using the Pods Gravity Forms Add-on
Integrate with Gravity Forms to create a Pod item from a form submission.
Used to create a shortcode for a form with a more descriptive post title
Covers interactions with Gravity Forms and our Pods Add-on for Gravity Forms which allows you to map your Forms to Pods Directly.
Used to put our Back-End Admin on the Front-end using the Pods Shortcode
Real life example of a function to create a Pods record from fields submitted on a form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?php function add_new_applicant () { // Get field values from form submission $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $telephone = $_POST['telephone']; $email = $_POST['email']; $fields = array( 'first_name' => $first_name, 'last_name' => $last_name, 'telephone' => $telephone, 'email' => $email ); $new_id = pods( 'applicant' )->add( $fields ); return $new_id; } |
Could also have a run through pods_sanitize to make sure the data is safe to be added.
1 |
pods('applicant')->add ( pods_sanitize ( $fields ) ); |
When you need to change what is shown in the drop-down Select Field in a Relationship, you can use this method to base the value on other values in Post Type.