Discussion on Quick and easy Post creation for ACF Relationship Fields PRO

Bazalt

Bazalt supports this item

Supported

30 comments found.

I’m registering the fields and field groups via PHP instead of using the ACF interface. Do you have any documentation on how to enable the on-the-fly post creation on a field using PHP?

Simply specify ‘acf_relationship_create’ => 1, in your field declaration:
if( function_exists('acf_add_local_field_group') ):

acf_add_local_field_group(array (
    [...],
    'fields' => array (
        array (
            [...]
            'type' => 'relationship',
            'acf_relationship_create' => 1,
            [...]
        ),
    ),
    [...]
));
endif;

Hey Bazalt,

Great little add-on. Can’t tell you how many times I’ve wanted this functionality over the last few years. Works great out of the box!

Wondering if you could provide some guidance to extend this for User Relationships as well. Not looking for hand-holding, just a nudge in the right direction.

In any case, great work! :)

I’m still hoping for a response @Bazalt

Hey, sorry for the delay. Well, this would be a great idea for a future version of my add-on. Right now, I don’t know if this could be technically possible. I rarely use User fields in my projects. That would certainly require a certain amount of work to extend these features to User fields, but I keep the idea in mind. Thanks for your suggestion!

Any chance you’d be making either a similar add-on or adding functionality that rather than create a new post, that you can just submit a text field?

Basically, I want to have it be a relationship field, but if the one I want isn’t there, to create a text field to go in its place rather than create a new post.

I’m not sure I completely understood. Relationship fields expect to be set with posts. What the point with “text fields” ?

I guess its for moderators who can’t publish posts – let them select from relationship, but if they need a post called ‘blue’ for example, and there is no blue post, that they can type blue without creating a blue post.

If the results were in a list I guess.

Sorry, but that definitely won’t be developed. As I said, relationship fields are linked to posts. I won’t get around permissions: if moderators can’t create posts, there’s a reason for that.

Does it support ACF relationships in a repeater field?

Absolutely.

abaumer

abaumer Purchased

Yo. Thanks. I’m pumped to try this. Just bought and installed and still don’t see the option to set the ability to create on my existing relationship fields. Also tried adding the setting in the ACF json for the field – similar to your instructions for PHP above, but nothing.

I’m on Wordpress 4.9.1 and ACF Pro 5.6.7

Any ideas? I don’t see any errors in the console nor wp debug either.

Hi, I just tried with the same configuration as yours without noticing any issue. Could you give me an access to your site?

csvk

csvk Purchased

Dear,

i’ve found a bug in your plugin. When i try to add a object from input type “Post Object” then new published post isn’t added to relation. In fileds type “Relation” every thing works fine.

In Dev Tools there are errors, after i click Publish>

VM4429 onloadwff.js:64:

Uncaught TypeError: l.toLowerCase is not a function at should_fill_on_click (onloadwff.js:64) at onloadwff.js:66

select2.full.min.js?ver=4.0:

The select2(‘data’) method was called on an element that is not using Select2.

select2.full.min.js?ver=4.0:3

Uncaught TypeError: Cannot read property ‘data’ of undefined

VM4735 load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,jquery-ui-position,jquery&load[]=-ui-menu,wp-a11y,jquery-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,svg-painter,wp-auth-check,jquery-ui-dra&load[]=ggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,shortcode,backbone,wp-util,wp-backbone,media-models,moxiejs,plup&load[]=load,wp-plupload&ver=4.9.1:299 Uncaught TypeError: Cannot read property ‘hasClass’ of undefined

You can download the new version 2.3, that has just been approved!

csvk

csvk Purchased

Nothing’s changed. Still new added post via “object post” filed type isn’t automatically assigned to the field.

Did you try to clear your browser cache? What tells the JS console?

jwood01

jwood01 Purchased

Have been using this plugin for over a year happily!

We have moved all editing to the front end and intend to block access to the admin section of the site. When we do this it breaks the calls to the admin-forms.

Is there a way to call front end forms for post creation?

You can hook into `acf-relationship-create/tooltip_links` which let you define the links that will be opened in the lightbox. You could then link to custom front end pages. Anyway, that will be a big work, because you’ll have to plug your custom pages with the add-on system.

Hi

Just bought your plugin and it is great but the “on the fly” check box wont show up on my ACF’s relationship field. It shows up beside a post so I can edit it but not add a new one, am I misunderstanding?

R Jonas

Hi, Can you please provide me a screenshot of the checkbox you’re talking about ?

Hi Bazalt,

Sorry I cant as I can’t figure out how to attach a screen shot to this forum. But I can try to explain.

In your photo https://s3.envato.com/files/197979866/04_new-content-created.jpg the blue + sign (Add New album) where you have it is not there, but it is on the album itself (in your case on the “Foley Room and ISAM) just under the serach bar, it is edit existing item, not add new).

Hope it makes sense

Hello, before to buy, I would know if it works also in the frontend for example using acf_form() function to create forms or other specific plugins

thank you! alessandro

Hello, It will work on the front-end as long as the user is logged.

Hi,

I’m really interested in this plugin. I also use a lot of acf_forms on the front end. In this case how does it display, since it’s an iFrame I guess there is no way to make it look just like the rest of the fron-end page, it will look like the WP back-end, won’t it?!

Just like a commentator above I’d really see an advantage of being able to use it for User relationships too, or any other relationships.

Thanks in advance for the answer et tout de bon!

Yannick

Hello Yannick, Your guess is right: even used from the frontend, the addon will still load wp-admin/* url. That’s why I mentioned above that it works on the front-end as long as the user is logged. See also this thread: https://codecanyon.net/item/quick-and-easy-post-creation-for-acf-relationship-fields-pro/17201274/comments?page=2&filter=all#comment_18506297.

by
by
by
by
by
by