Home › Forums › Feature Requests › Feature Request: Hidden / Disabled Field Type › Reply To: Feature Request: Hidden / Disabled Field Type
If you want a quick and dirty fix to add “edit” links to your repeater post selectors, add this snippet into the input.js file (adjust the wp-admin url if needed):
/wp-content/plugins/acf-repeater/js/input.js
on line 125 at the end of the render function
/*EDIT LINK START*/
$('.repeater, .field_type-post_object').find('.post_object').each(function(){
var $editLink = $(this).parent().find('.edit-field-link');
if($editLink.length == 0)
{
$editLink = $('<a href="/wp-admin/post.php?post='+$(this).val()+'&action=edit" class="edit-field-link">Edit</a>');
$(this).before($editLink);
}
});
$('.repeater, .field_type-post_object').on('change','.post_object',function(){
var $editLink = $(this).parent().find('.edit-field-link');
$editLink.attr('href','/wp-admin/post.php?post='+$(this).val()+'&action=edit');
});
/*EDIT LINK END*/
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.