Home › Forums › Backend Issues (wp-admin) › acf/fields/flexible_content/layout_title › Reply To: acf/fields/flexible_content/layout_title
I just tried this, and it does not work either, because the “.acf-fc-layout-handle” “cleans” the div again.. I can see the value being added to the “.acf-fc-layout-handle” for a short second and then it´s gone.. 😉
function showstopper(obj) {
obj.each(function() {
var obj = $(this);
var target = obj.closest('.layout').children('.acf-fc-layout-handle');
var value = ' <span>' + obj.find('input').val() + '</span>';
target.append(value);
});
}
acf.add_action('ready', function() {
showstopper($('.dog'));
});
acf.add_action('hide_field', function($field, context) {
showstopper($field);
});
acf.add_action('show_field', function($field, context) {
showstopper($field);
});
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.