Support

Account

Forum Replies Created

  • I have something simmiliar.

    1) I created a few pages with acf fields.
    2) I generate json file with this fields group.
    3) I clean database and then create programically pages (with same names and slug thats before).
    4) I import acf fields from json file.
    5) I go and edit some page – i can’t see acf fields.
    6) I must edit acf fields group and click Update. Now i can see fields on page edit.

    This is issue?

  • With new update this fix does not work 100% properly. In that code pasted above i changed styles for tab (.acf-field-object-tab).

    In a few days i add new styles on this topic.

  • But i don’t want button “add new row”

  • Yes. Horizontal group of fields

  • 6. Yep. Now you can add instructions, but sometimes this text may be very long and take a place. Maybe add checkbox for “show instructions with icon help” and show tooltip on click.

    7. Look at this thread:
    http://support.advancedcustomfields.com/forums/topic/repeater-field-divider-border/

    9. Another idea : create simple row without [add new row]. Sometimes i wants to have 3 inputs next to each other or something like that

    8. I use code for this:

    
    function my_theme_add_editor_styles() {
        global $post;
        if (get_current_post_type()=='loremIpsum') {
            add_editor_style( get_template_directory_uri() . '/css/loremipsum-styles.css' );
        }
    }
    add_action( 'after_setup_theme', 'my_theme_add_editor_styles' );
    

    But your idea is very nice.

    11. Collapse field. Not repeater collapse, but maybe panel with collapse option.

    12. [select custom fields values] field? For example. I have custom post A. In this post i have repeater AR. Now on other post type i want select (or something like post object) with values from AR

    13. Better layout for tabs (not when create fields group but when edit page). Now when i have lots of tabs, layout is broken.

  • Another fix. This style add better layout for block repeater (when edit page) and better layout for tab field (when edit fields group). This may help when you create group with lots of fields and tabs.

    Add this code to your functions.php

    
    //-----------------------------------------------------------
    // ACF custom uber styles
    //-----------------------------------------------------------
    function custom_acf_repeater_colors() {
         wp_enqueue_style( 'acf-uber-styles', get_template_directory_uri() . '/css/admin/acf-styles.css' );
    }
    add_action('admin_head', 'custom_acf_repeater_colors');
    

    and then create acf-styles.css on your-theme/css/admin/ (or change above path) and paste css to it:

    
    /* nth field background */
    .acf-input-table.row-layout .acf-row:nth-of-type(2n) .acf-table {
        background:#fafafa;
    }
    /* left field label td */
    .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.acf-label {
        background:#eee;
        border-color:#ddd;
    }
    /* field td */
    .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.acf-input {
        border-color:#ddd;
    }
    /* left and right side - order and delete td */
    .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.order,
    .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.remove {
        background:#e3e3e3;
    }
    /* space between row - only border works */
    .acf-input-table.row-layout > tbody > tr > td {
        border:0;
        border-bottom:3px solid #DFDFDF;
    }
    
    /* acf edit page */
    .acf-field-object-tab {
        background: #fafafa;
        background: -moz-linear-gradient(top,  #ffffff 0%, #f6f6f6 47%, #F0F0F0 100%);
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#F0F0F0));
        background: -webkit-linear-gradient(top,  #ffffff 0%,#f6f6f6 47%,#F0F0F0 100%);
        background: -o-linear-gradient(top,  #ffffff 0%,#f6f6f6 47%,#F0F0F0 100%);
        background: -ms-linear-gradient(top,  #ffffff 0%,#f6f6f6 47%,#F0F0F0 100%);
        background: linear-gradient(to bottom,  #ffffff 0%,#f6f6f6 47%,#F0F0F0 100%);
        border-bottom : 2px solid #F0F0F0;
    }
  • Ok i have some news.
    Autor of this plugin uses code:

    $("#e15").select2("container").find("ul.select2-choices").sortable({
        containment: 'parent',
            start: function() { 
                $("#e15").select2("onSortStart"); 
            },
            update: function() {
                $("#e15").select2("onSortEnd"); 
            }
        });

    I look into code of this plugin. Method onSotrStart hide search field, and onSortEnd show it. Then I read something on jQuery UI page: api.jqueryui.com/sortable/#event-update


    “update event: This event is triggered when the user stopped sorting and the DOM position has changed.”

    This is true, but only when we mix values (tags). When we place tag on search field or move tag sligly to the side, DOM does not change. That’s why instead of use update event you should use stop event.
    http://api.jqueryui.com/sortable/#event-stop

    stop: function() {
         $("#e15").select2("onSortEnd"); 
    }

    I check and its work very well πŸ™‚

  • After some test i found that this is issue of selec2 plugin.
    When you drag value directly on the [search field] and this search field cant move on beter place, they got “display:none”. But you can fix this by another “dragging-mix values”.

    http://ivaynberg.github.io/select2/
    You can test this on “Select2 Drag and Drop” section

  • You may add custom styles for this. In functions.php

    
    function custom_acf_repeater_colors() {
       echo '<style type="text/css">
            /* nth field background */
            .acf-input-table.row-layout .acf-row:nth-of-type(2n) .acf-table {
                background:#fafafa;
            }
            /* left field label td */
            .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.acf-label {
                background:#eee;
                border-color:#ddd;
            }
            /* field td */
            .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.acf-input {
                border-color:#ddd;
            }
            /* left and right side - order and delete td */
            .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.order,
            .acf-input-table.row-layout .acf-row:nth-of-type(2n) td.remove {
                background:#e3e3e3;
            }
            /* space between row - only border works */
            .acf-input-table.row-layout > tbody > tr > td {
                border:0;
                border-bottom:3px solid #DFDFDF;
            }
             </style>';
    }
    add_action('admin_head', 'custom_acf_repeater_colors');
    
  • The same things happens with other select: fot example “pages select”

Viewing 11 posts - 1 through 11 (of 11 total)