Support

Account

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);
        });