Custom Fields
Re-Envisioned
Support Meta Box Columns Issue with complex form and columns

  • Creator
    Topic
  • #7712
    si2info
    Participant

    Hi,

    I’ve an issue when I do a complex form that include ‘Metabox Group’ and ‘Metabox Columns’ (and ‘Metabox Frontend Submision’ too).

    I’m triying to do a group with five fields like this:

    Code:

    array(
          'type' => 'group',
          'id' => 'mygroup',
          'name' => __('My group name','textdomain'),
          'fields' => array(
            array(
              'id' => 'id1',
              'name' => __('ID1','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id2',
              'name' => __('ID2','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id3',
              'name' => __('ID3','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id4',
              'name' => __('ID4','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id5',
              'name' => __('ID5','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
          ),
          'columns' => 12,
    ),

    In theory, this should print a row with 5 columns, each column of 2/12, but its print a row of three columns and two columns after, breaking all HTML form.

    I think that this happens because the plugin Metabox Columns close two divs in the same time, when it shouldn’t.

    Captures:

    View post on imgur.com

    View post on imgur.com

    This issue was happen in other times with ‘divider’ and ‘heading’ fields types and i fixed it deleting this fields. I read all documentation about this plugins but I haven’t found other solution for the moment.

    Thank you so much.
    Regards!

Viewing 6 replies - 11 through 16 (of 16 total)
  • Author
    Replies
  • #8036
    Teia Local Studio
    Participant

    Dear Ahn,

    I have updated both plugins and now the columns are being built perfectly, however — since I am using the tabbed settings panel + styled as BOXES — every metabox is being rendered inside one another, on a cascade fashion…

    Instead of:

    [metabox] … [/metabox]
    [metabox] … [/metabox]
    [metabox] … [/metabox]

    I have:
    [metabox] …
    [metabox] …
    [metabox] …
    [/metabox]
    [/metabox]
    [/metabox]

    If I set the panel to use NO-BOXES, problem still persists. The content of the second, third and other tabs are not rendered at all. Reverting back to COLUMNS 1.1.0, even with MB 4.13.0 solves the problem.

    View post on imgur.com

    View post on imgur.com

    I will try to reproduce the bug on a clean wordpress install with a simple MetaBox and a simple tabbed settings panel, if it still happens, will post the code here.

    Thanks Ahn!
    G.

    #8058
    Anh Tran
    Keymaster

    Can you please send me the code of the settings page to test?

    #8119
    Teia Local Studio
    Participant

    Hello Ahn!

    I was able to easily reproduce the bug
    on a clean/fresh install using just TwentySeventeen theme.

    — Latest WORDPRESS
    — METABOX latest 4.13.0 version.
    — SETTINGS PAGE 1.3.2
    — COLUMNS 1.1.0 and/or 1.2.0 (the source of our trouble: breaks the tabbed settings page)
    (…and remembering: reverting back to COLUMNS 1.0.0 solves the problem! Try it!)

    I did zip my clean TwentySeventeen theme with the code inside
    and shared via Google Drive, please get it here:

    https://drive.google.com/open?id=1eZLY4F5ZR1KUbHwW9ZFMiZaVr6MsWFJY

    Just activate it on a clean WordPress and use the plugins mentioned above.

    * FUNCTIONS.PHP ——— loads the settings page (last line: #589)
    * BOOT-SETTINGS-PAGE.PHP ——— start the metaboxes and build the tabbed settings
    And the folder * /SETTINGS-PAGE/ ——— presents all the files that build every tab and its boxes (I like to do the “include” way, for better and easier organization of each meta box).

    Thanks for looking on this!
    Looking forward for news!

    Regards,
    G.

    #8124
    Anh Tran
    Keymaster

    Thanks a lot for your code. I will look at that and fix as soon as I can.

    #8141
    Anh Tran
    Keymaster

    I’ve just fixed this bug and tested with your code in version 1.2.1. Please update!

    #8146
    Teia Local Studio
    Participant

    Super!
    It’s fixed, YES!
    Thanks so much!
    G.

Viewing 6 replies - 11 through 16 (of 16 total)
  • The topic ‘Issue with complex form and columns’ is closed to new replies.

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash