A little background
We have been using Advanced Custom Fields (ACF) for adding custom meta to posts, option pages etc. It works reasonably well and the UI is quite good, which makes us comfortable with putting it in the hands of our customers.
However, the drag and drop method for creating the fields leaves some things to be desired.
There is no sane way to programmatically add fields.
Translating the backend UI is a pain in the neck, requiring you to export to PHP and manually adding translate text functions. If you then make any changes the field-group, you’ll have to redo the export and re add the translations.
So we’ve been looking at alternatives which can remedy this.
We tried CMB2, but we found that it does not quite have all the features that we’ve gotten used to from ACF. For example nested repeaters. Unfortunately that was a deal breaker.
The next shiny thing™
The thing that sealed the deal was @lindstromer‘s presentation. It was quite obvious that it would be a relatively minor thing to get started with Papi and that it was quite capable and the code and API was well written.
After getting past the initial setup and tooling around, it is actually quicker to add fields using Papi compared to ACF.
Transitioning the meta from ACF to Papi can be a bit onerous. Your old posts will not have a Papi page type set, so you can’t see the new meta boxes.
I didn’t have all that many posts to convert, so I did a little quick and dirty. I used to ACF to create a field with the same slug as Papi’s page type property and just pasted the page type slug I had set in code.
Having to select a page type when adding a new custom post type which only has one page type may seem a little unnecessary. But there’s probably a simple way to circumvent that issue. [ Turns out that there is a simple way. Thanks @frozzare 🙂 ]
Considering that Papi can do almost all the things that ACF can, and that all the configuration is in code, it feels like a no-brainer to me. And I expect that in future releases it will inch ever closer to ACF capability wise.
And one thing that have failed to mention is that Papi is open source. And we do love open source!