Custom Fields
Support Meta Box Group Bug with radio buttons inside repeatable group

  • Creator
  • #8626

    I have a repeatable group that contains four fields:

    1. A set of radio buttons
    2. A post field that is only displayed when radio button A is selected.
    3. A text field that is only displayed when radio button B is selected.
    4. A text field that is always displayed.

    This group is on a settings page. When I click on the “Add more” button on my settings page in the WordPress admin to add a second group, any selection that was made in the radio buttons in the first group disappears. Am I doing something wrong here or is this a bug with Meta Box?

    You can see the code here:

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
  • #8628
    Anh Tran


    When clone a field or a group, the values of that field or sub-fields will be cleared. This is the expected behavior so users can enter new values in the new cloned fields.

    In case you want to keep a pre-defined value for a field/sub-field, please set 'clone_default' => true for the field/sub-field (in this case, probably is the radio field). This parameter will auto set the std value for new cloned field.


    Hi Ahn,

    That is really great to know, but that does not exactly address my issue. For clarity, here is the workflow of my issue:

    1. A user goes to the settings page and sees only the first “extra link” group. None of the fields in that group are filled out initially.

    2. The user selects one of the radio buttons – let’s say it’s radio B. They also add text into all of the other fields in this first group.

    3. The user clicks on the “Add more” button to display a second group.

    4. None of the fields in the second group are filled in as expected (as you noted.) However, neither radio button in the *first* group is selected now. The previously selected radio button in that first group is now unselected – this happens when the group is cloned to create the second group.

    Anh Tran

    I see. I fixed that bug 2 weeks ago. I’ve just released new version of the Meta Box plugin, please update it.


    That is great to hear! We will update it and test. Thank you!


    That indeed fixed it. Thank you again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug with radio buttons inside repeatable group’ is closed to new replies.
grid gear info copy caret-up caret-down trash