Unfortunately, this did not work. The acf_form() still saves the data to the product it is embeded on.
How can I remove the “Solved” tag?
Thanks John!
Hi again John.
Could not get your code to work, the code you so kindly share here: https://acfextras.com/dont-query-repeaters/
So I modified it and had to use the field keys like so:
add_action('acf/save_post', function( $post_id ) {
$meta_key = '_book_authors';
$saved_values = array();
$authors = $_POST['acf'];
if( $authors ) {
foreach( $authors['field_55bf6c9024b5f'] as $key => $author ) { // field_55bf6c9024b5f: ACF field key for "book_authors" meta field
$author_id = $author['field_55dafbfa91614']; // field_55bf6c9024b5f: ACF field key for "book_authors" meta field
add_post_meta( $post_id, $meta_key, $author_id, false );
}
}
}, 20, 1 );
Thank so much John, that’s a great answer! 🙂
It works by adding this script right after acf.add_action(‘ready append’, function( $el ){}
// field_name
acf.fields.FIELD_NAME = acf.fields.select.extend({
type: 'FIELD_NAME',
});
Me too, +1 for this feature.
Thanks @malesandro, but I think php memory is also set 256mb according to the hosting provider. I have contacted theme about this problem again. I don’t have access to edit the phpinfo file myself.
I have the same problem. I have created a repeater field that is used on the_front_page, where the admin can insert google map coordinates. The admin has inserted over 200 fields of coordinates which results in a Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes).
Memory is set to 256MB in the wp-config.php and on server, so there should be plenty of memory.
This issue only appears in the backend, editing the page.
I am using ACF Version 4.3.9 and ACF repeater field Version 1.1.1.
Is there a chance that ACF Version 5.1.5 will run better regarding this?
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.