During your ajax request, the flexible content field is never loaded, therefore, your extra page layout and page_link field is never registered.
Is there a way to manually load the fields with another ajax request?
Hi @elliot
– Is your field group registered via code?
I have tried both, neither worked. In production I want to register it via code.
– Can this layout and field be added in a different way (not within a load_field filter)?
Not that I know of. I try to achieve that the individual layouts can be loaded with a single call. So that every layout is a bower component which includes field layout, include of the JavaScript and other necessary functions.
Greetings
Patrick
Hi.
Sadly I still could not resolve my problem. I found out that a similar problem also occurs in the gallery-field.
There, I’m not able to edit a photo after I inserted it.
Seems to be some bigger problem with the Plugin-JavaScript and hooked fields in general.
Hi @Jonathan.
There is no difference.
When I export the working page_link element from the GUI I get this code:
array (
'key' => 'field_557ff199ab6a8',
'label' => 'Link_aus_GUI',
'name' => 'link_aus_gui',
'type' => 'page_link',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'post_type' => array (),
'taxonomy' => array (),
'allow_null' => 0,
'multiple' => 0,
),
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.