Home › Forums › Add-ons › Repeater Field › Anchor links to scroll down to a specific ACF repeater › Reply To: Anchor links to scroll down to a specific ACF repeater
I am struggling with the same “issue”, and I tried John Huebner’s example, but the function to generate the id doesn’t work (the value of the variable is null when echoed).
add_filter('acf/prepare_field/key=field_62440b6868c96', 'is_readonly');
function is_readonly($card_group_id) {
$card_group_id['readonly'] = true;
return $card_group_id;
}
add_action('acf/save_post', 'generate_cardgroup_id');
$post_id = get_the_ID();
function generate_cardgroup_id($post_id){
if (!$rows['card_group_id']){
$rows['card_group_id'] = uniqid($more_entropy);
}
$rows['card_group_id'] = 1234;
}
Please could someone have a look? I’m really frustrated 🙁
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.