How much does Pods cost?
Pods is free and will remain free, but check out how much effort it’s taken to get it to where it is today!
Pods is free and will remain free, but check out how much effort it’s taken to get it to where it is today!
The Pods Framework has been around since late 2008. Planning, design, development, and testing started in 2010 for Pods 2.0 leading to an Alpha release on January 2nd, 2012. Beta was released on August 12th, 2012. Now Pods 2.0 has finally arrived, as of September 21st, 2012!
After our soft launch, we’ve been working on bug fixes for the past few weeks to ensure maximum stability and backwards compatibility before going full force with our 2.0 announcement. That point has been reached and we’re ready for the flood of new users that awaits, including our awesome Pods 1.x users who are anxious to upgrade.
Have at it, and most of all — Enjoy the freedom of developing any type of content with any type of field that you can think of for WordPress!
Please report bugs and suggest features in our GitHub Issues area. We’ve got an awesome feature line up for Pods 2.1 that is already in progress, we’ll announce our 2.1 testing program in the next month. Pods 2.1 is scheduled to be released alongside WordPress 3.5 on December 5th, 2012.
We have to really thank Automattic and Matt Mullenweg for all they’ve done to help us, we honestly could not have finished Pods 2.0 and taken it to the next level without their support.
RD2 provided some awesome UI design work for our new 2.0 upgrade screens.
MarkNet Group provided extra help when we needed it to keep the project going over the past two years, major kudos!
Below is a feature list that goes over what 2.0 offers, we hope you enjoy it as much as we have while we’ve used it on our own projects.
Holy Cow in a plugin Scott! I’ve been looking at it since Thursday afternoon and it’s absolutely wonderful. The UI is great, intuitive, and very forgiving when you’re making mistakes. Love seeing how far you’ve come with Pods as it is by far one of the most powerful plugins/frameworks/extendomatic-in-a-box things to to ever happen to WordPress.
I’m a big fan of how you re-vamped “Helpers”. Using it as a custom post type with the built-in WordPress revisions feature is spot on smart. This is honestly the first time I’ve ever looked at Pods 2.0 in any of its forms. The really cool thing to me is that you created “Helpers” in a way that provides flexibility and history. Using Code Mirror for syntax highlighting, storing it as a custom post type, and utilizing WordPress’ built-in revisions function takes “Helpers” light years beyond what it was in the 1.x.x releases. As a long time user of Pods I’m completely overjoyed with Pods 2.0!
Again, thanks for all that you’ve contributed to the WordPress community.
It’s messages like these that make what I do worth it. That’s exactly what I set out to do for Pods 2.0, so I’m very glad that was successful!
Beta testing of the new Gravity Forms integration with Pods is going on NOW!
This code has evolved as it’s been used on a number of my projects since I started using Gravity Forms when it first came out back in 2009. I’ve refactored it a bit, and it’s now available for devs to geek out with their PHP out.
It doesn’t have a UI yet, so it’s really meant to be tested on a manual PHP integration at the moment.
This component will be baked into Pods 2.0 itself, but the code as it is right now was built to work with Pods 1.12+
To map a GF entry, hook into the gform_post_submission action for the form you want to integrate with. I usually hook into the gform_post_submission action itself and handle all my forms within a few if/else statements. Once in the function that runs during that action, you just map your $entry array to the Pods_GravityForms::map function.
Pods_GravityForms::map( $entry, $pod_name, $mapping );
$mapping is a key=>value array of fields (key is the GF field ID, value is the pod column name).
In $mapping, you can provide an array for the value, which can contain many other options. Some examples of these would be ‘field’ (the name of the Pod field to save into), ‘bool’ (see below for BOOLEAN fields), ‘default’ (the value to set if no value is given by the form), and ‘bypass_value_set’ (don’t get the value from the GF field value, always use the ‘default’ for value).
For PICK fields, Pods will check to see if the value passed by GF is numeric, if not, it will look up your items by name and try to find the best match. I usually setup my corresponding fields in GF to send back the value as the Pod item ID I want to relate to. You can optionally create your own dynamic field options with the ‘gform_pre_render’ action in GF, hooking into the field’s ‘choices’ array, set the text and value as you need.
For BOOLEAN fields, Gravity Forms sends back Yes / No, or other text depending on how you’ve labeled that field. In those cases, set your map field array value of ‘bool’ to the ‘Yes’ value you want to be triggered by.
Since Gravity Forms doesn’t give you a standard data array both in pre AND post, with this code you can also build a faux $entry array in your GF validation / pre-processing. This also makes it possible to map a GF entry to a Pod before the entry has actually been created in GF.
$entry = Pods_GravityForms::setup_entry( $gf_validation );
That’s the simple version of it, there’s a lot more complexity built in that I’ll try to get some more examples posted here asap.
In most of my form integrations with GF, I’ve had a need for a few methods that I threw in here for your enjoyment as well!
Auto delete the entry GF creates, which runs after post-processing:
Pods_GravityForms::auto_delete( $form_id );
Auto login a user from GF User Registration form:
Pods_GravityForms::auto_login();
Set a select field’s values to pull from a Pod instead of being static/hard coded:
Pods_GravityForms::dynamic_select( $form_id, $field_id, $pod_name, $label_column_name, $params );
https://github.com/pods-framework/pods/blob/2.0/components/GravityForms.php
Here is a basic example for the Gravity FormsPods connector class:
For a basic contact form, with name, email, website, and comment fields numbered 1, 2, 3, 4.
add_action("gform_post_submission_1", "push_to_pods_test", 10, 2);
// the _1 limits this hook to run only on form id = 1
function push_to_pods_test($entry, $form) {
// the function accepts two parameters, but we're going to deal
// exclusively with the $entry object (contains only the user-entered data)
$pod_name = 'cf_submission';
// the name of the destination pod
$mapping = array(
"1" => "name",
"2" => "email",
"3" => "website",
"4" => "message"
);
// $mapping contains a key=>value array of fields
// (the key is the GF field ID, the value is the pod column name).
Pods_GravityForms::map( $entry, $pod_name, $mapping );
// do it!
}
Here’s a little more complicated example, including some pick fields. You can map any field that is part of the $entry object, and there are lots more than just the ones from your Gravity Forms fields. So it might be worth doing a little print_r($entry); investigation as part of your hooked function. Of course, both of these examples belong in the functions.php of your active theme.
In the Gravity Form used below, date_created is the date/time recorded when the form was submitted, gender and t_shirt_size are both pick fields. The name and lastname fields are populated from specific fields inside a GF advanced “Name” input.
add_action("gform_post_submission_2", "push_to_pods", 10, 2);
function push_to_pods($entry, $form) {
$num_entries = rgpost('input_1');
// you can the fetch the value of a single entry if you need it for logic later in the import
// print_r($entry); // if you want to look around a little
$pod_name = 'participant';
$mapping_1 = array(
"date_created" => "date_registered",
"3.3" => "name",
"3.6" => "lastname",
"4" => array ("field" => "gender"),
"5" => array ("field" => "t_shirt_size"),
// Extra parameters can be added by passing an array. Here,
// field contains the column name the pick should map to
"6" => "birthdate"
// dates will come in as date objects
);
if ( $num_entries >= 1 )
Pods_GravityForms::map( $entry, $pod_name, $mapping_1, '', true );
}
posted too quick…
add_action("gform_post_submission_2", "push_to_pods", 10, 2);
function push_to_pods($entry, $form) {
$num_entries = rgpost('input_1');
// you can the fetch the value of a single entry if you need it for logic later in the import
// print_r($entry);
$pod_name = 'participants';
$mapping_1 = array(
"date_created" => "date_registered",
"3.3" => "name",
"3.6" => "lastname",
"4" => array ("field" => "gender"),
"5" => array ("field" => "t_shirt_size"),
// Extra parameters can be added by passing an array. Here,
// field contains the column name the pick should map to
"6" => "birthdate"
// dates will come in as date objects
);
if ( $num_entries >= 1 )
Pods_GravityForms::map( $entry, $pod_name, $mapping_1 );
}
This is all very well and good, but instead of adding more and more features to Pods 2.0, how about just getting it out the door? It’s already a year past the original target release date. The kickstarter thing seemed to suggest that by putting in money, the release would come soon. Keep on adding stuff and it might not even be out in 2012.
Thanks for the feedback. I’m more aware than anyone of the timeline issues, and I’ve posted updates explaining everything here before so I don’t have to go too far into it. This was a crucial feature of 2.0′s release cycle that I haven’t spent more than a few hours of my Pods time on, this was the result of client work over the past few years, actually previous to 2.0 development itself.
Keep a look out for more progress on 2.0 as I’ve recently hired Fifth Room Creative on to help get the remainder of 2.0 ready. Thanks for your patience and I’m looking forward to the upcoming 2.0 beta.
Not to white knight Scott here, but a few points:
Contributing to a kickstarter for an open source, free project is not the same thing as paying for a fee-for-service project.
During the time period, Pods has received regular updates — and many of the 2.0 features have been rolled out as a part of the updates process.
Time is more valuable than money. Even if you were to kick in $1000, that would realistically fund 10-15 hours of development time.
If you want it out sooner, pitch in answering help requests on the discussion board, volunteer to knock out some punchlist items, offer to test some completed code, write up documentation for an undocumented or poorly documented feature, hang out on the IRC channel and answer support requests… Open source only works when people treat it like a community, not a service.
I think that mentioning kickstarter obscured the message I wanted to convey somewhat, which was that I was worried that Pods 2.0 might be suffering from feature creep. Scott’s reply seems to suggest that’s not the case.
Thanks for the clarification
Feature creep has been managed, I’ve organize an assault on the remaining 2.0 features and have pushed any fluff to 2.x
This class is in Pods 2.0, I’ll continue updating it there. To get access to it, simply go to:
https://github.com/pods-framework/pods/blob/2.0/components/GravityForms.php
Noticed a couple issue — the first is either it is a documentation issue or a bug:
Pods created by the Gravity Forms add-on do not auto-generate a slug if the slug is left blank. When the docs are written up, slug auto-generation needs to either be integrated, or an example left in the docs for slug auto generation.
With pods entries created by the Gravity Forms add-on — if a GF form field is left blank, a single letter is entered in the Pods form field.
Awesome work on this Scott! Thanks!
Aha, thanks for the heads up, will get that looked into and fixed
Best place for bug reports is in our GitHub though, feel free to add a report there when you’re able to.
Spoke with Amir from WPML.org and we decided once we get 2.0 to the testing phase they are going to have their developer start working on an ‘integration’ plugin which sits in-between WPML and Pods. I’ll assist their developer in getting things working, understanding our code, and adding any filters / actions that 2.0 might lack. Almost directly after 2.0 hits the final stages, I’ll also be working on a Gravity Forms add-on which will let you use Gravity Forms to submit data into your Pods easily through their own UI.
Anyways, good stuff coming ahead for integration with other plugins!
bjornet 8:23 pm on September 5, 2012 Permalink | Log in to Reply
I really appreciate you for showing this, this example helps me as developer to set a decent pricetag on my work and of cause understand the tremendous amount of work you guys have put into Pods.