siteorigin / siteorigin-panels

SiteOrigin Page Builder is a powerful content creation interface, instantly recognizable, astonishingly different. SiteOrigin Page Builder makes it easy to create responsive column-based content using the widgets you know and love. Your content will accurately adapt to all mobile devices, ensuring your site is mobile-ready.
https://siteorigin.com/page-builder/
GNU General Public License v3.0
610 stars 181 forks source link

Support for Advanced Custom Fields (ACF) #86

Closed marcusforsberg closed 3 years ago

marcusforsberg commented 9 years ago

Hello!

I am trying out this plugin for a client and it's looking great. We will however be working with some fairly complex widgets for their grid-based front page, and rather than implementing a lot of the form elements for editing this we're going to use the Advanced Custom Fields Pro plugin to create custom fields for our widgets (for things like images, repeating fields, etc). Hooking up ACF to widgets is possible, and doing so shows the fields properly in the normal widgets area in WP. However, the custom fields don't seem to show up when editing a widget using SiteOrigin.

I'm not sure if this is something that must be supported on your side or on theirs, so I'm going to contact Elliot over at ACF as well. Connecting these two plugins would definitely allow for some pretty powerful stuff!

marcusforsberg commented 9 years ago

Hi! Any comment on this..? :)

I've bumped an old suppor thread on your website about it as well with a short code snippet that has gotten me halfway there: https://siteorigin.com/thread/support-for-advanced-custom-fields-5-fields-in-widgets/#comment-76511 Maybe that helps?

braamgenis commented 8 years ago

Hey @marcusforsberg

We're definitely keen for this to work, but it will likely take a substantial amount of effort. We'll try get to it in the not too distant future. We'll drop a comment here when we look into it in more detail.

dimitrov-adrian commented 8 years ago

Hi,

I had did something in my obsolete project, it have basic support for ACF, WPCF and CMB2

Widget in https://github.com/dimitrov-adrian/sassy/blob/master/includes/widgets.php (SASSY_Widget_Content_Element)

And custom field registrator in https://github.com/dimitrov-adrian/sassy/blob/master/includes/integrations/custom-fields.php

I will be glad if it helps with something.

KevinTaron commented 8 years ago

Would love to see this feature!

jurosko commented 7 years ago

Could you please prioritize this enhancement? WE would love to see this feature!

gregpriday commented 7 years ago

Hi @VladoJ we'd love to get this feature in too. We have a lot going on at the moment with a few updates, but we're hoping to get this in with the next update of Page Builder.

gregpriday commented 7 years ago

@VladoJ - I see you also posted a 1-star review for Page Builder over this issue. Just to let you know a 1-star review is a very demotivating way to say that you think our plugin is absolutely terrible. If you feel that way, it's fine, but It also tells us you're not using the plugin anymore, so it's definitely not a good way to motivate us to implement a feature.

We're a small team and we work hard at Page Builder. We poured hundreds of hours into the last update adding a lot of high priority features. Copy paste, better shortcode handling and labelling are all features requested by our fans and this is what motivated us to implement them.

It's worth noting that we're not delaying implementing features out of spite. It's all about the time we have available.

jurosko commented 7 years ago

Sorry Greg, I wrote the review in afekt, because I planned to build one web with combo SO builder + ACF and it was not working as expected. But as a solution I used siteorigin widget framework, where is also the possibility to simply make repeat fields and so on. I just tried to highlight this issue and planned to change the review after it, but it was really not nice from me.

I already updated my review. You are doing great work and I love siteorigin builder. Also my colleagues developers agreed this is the best builder.

I understand that there are higher priorities than ACF integration. I also wrote on their support forum so maybe they will be willing to cooperate with you.

gregpriday commented 7 years ago

@VladoJ Thanks - I appreciate that 👍

And thanks for your feedback. Our goal with Page Builder is to make it the Swiss Army Knife of layout builders. It should be usable in lots of different places, and one of the places we have on our list is with ACF. So this is actually a higher priority enhancement now.

Unless we run into major roadblocks (which is possible), we'll have it in the 2.6 release.

rededge-ian commented 7 years ago

@gregpriday Hi Greg, I know y'all are working on this and have a huge amount on your plate these days, especially with 4.8's widget changes, but just wanted to say that if your team needed any pre-release testing we'd be very excited to assist. Thanks!

ghost commented 7 years ago

@gregpriday any updates about this? thanks

jorisvm commented 7 years ago

This would be extremely powerful! I looked into this in the past and would really like to hear about it when it is fully supported in the SiteOrigin page builder.

hadamlenz commented 6 years ago

I created a widget for pb following this tutorial

then I set the ACF field to show up when the widget is equal to the widget I created.

It works, but the ACF fields do not save, and ACF's conditional formatting doesn't work

ghost commented 6 years ago

@hadamlenz you didnt follow the discussion? page builder does not work with ACF

hadamlenz commented 6 years ago

Well it sorta does @LittleHamster . The data you enter in the ACF created form gets saved to the posts meta-data in the panels_data array. You can then use ACFs filter acf/load_value to find that data in the panels_data array and feed the value back into the form. The beauty is, PB saves data way better that ACF's gazillion post meta entries.

because the forms are populated by an ajax request you have to read the wp_get_referer() and parse out the post variable from the query vars, and read the $_REQUEST['instance'] so that you can get the _sow_form_id variable to make sure the data is for the correct widget instance.

So far I can get Images and Text values to work. Working through the rest now.

I also assume I am going to have to do some work on PBs shortcode so that I can display the values in the content

hadamlenz commented 6 years ago

I went through and tested all the fields. About half work and the other half seem like they are very JS dependent.

Working Text, Image, Radio, Range, oEmbed, File, Button Group, Link, Taxonomy

Not Working WYSIWYG, Post Object, Gallery, Checkboxes, Page Link, User, Relationship, Date, DateTime,Time,Color,Map

Also none of the validation works and none of the formatting for ACF widths work correctly

Here is the start https://github.com/hadamlenz/PageBuilder_Acf_Widgets

I think I'm just going to built the forms in page builder for now

z0mbat commented 6 years ago

+1

Two such popular and powerful plugins should work together. :) The power of ACF and your page builder would make content management and theme development a real treat.

AlexGStapleton commented 3 years ago

Resolved by https://github.com/siteorigin/siteorigin-panels/pull/830

In the 2.12.0 update, we introduced ACF support in Page Builder. I'm sorry ACF compatibility wasn't introduced sooner than this. Adding compatibility required resolving ACF JS not working as expected in the Page Builder interface, general data disassociation, and a saving related issue for non-SOWB related widgets.

Please give the update a try with ACF, and let me know if you run into any issues while testing this change. :)

alexbovey commented 3 years ago

Hi @AlexGStapleton

Thanks so much for this update and the work behind it.

Whilst this appears to work well for some basic ACF fields, it does not appear to be saving the data for Repeater fields unfortunately. Do you know if this was tested against Repeater fields?

Thanks a lot.

AlexGStapleton commented 3 years ago

Hi @alexbovey,

That field was briefly tested during a bulk test but it appears its incompatibility wasn't caught as I've been able to verify this. I'll submit a PR shortly with a fix.

Kind regards, Alex