Cloning Max 2

Support MB Group Cloning Max 2

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #46320
    Roderick GeisRoderick Geis
    Participant

    I been having this issue for quite some time now, and not sure if it has to do with the latest update that broke the Cloning ability.

    My issue is that when the Max number of clones is set to 2, then the "Add More" button does not appear. I would fix that in JS by clicking the remove-clone element.


    const removeCloneElem = document.getElementsByClassName('remove-clone');
    removeCloneElem[0].click();

    This works but then for some reason my responses are all shifted.

    <input type="text" required="1" id="group_1_color" class="rwmb-text" name="group[1][color]" aria-labelledby="group_1_color-label">

    There is no starting from 0. Not sure what is causing this. Thank you for any help!

    #46326
    JackkyJackky
    Participant

    Just noticed the same

    #46327
    PeterPeter
    Moderator

    Hello Rod,

    The issue is related to this topic https://support.metabox.io/topic/metabox-5-10-0-metabox-aio-1-30-0-max_clone-issue/
    our development team is working on this issue and the fix for this issue should be included in the next update of MB plugins.

    #46380
    Roderick GeisRoderick Geis
    Participant

    Hmm, I updated the plugins, and the issue persists. This time, it has to deal with the HTML:

    <input type="text" required="1" id="rpi_stones_group_info_1_stones_full_name" class="rwmb-text" name="stones_group_info[1][stones_full_name]" aria-labelledby="stones_group_info_1_stones_full_name-label">

    How come it is starting at index 1 and not 0?

    The error of my console comes out as:
    The invalid form control with name=‘stones_group_info[0][rpi_stones_full_name]’ is not focusable.

    #46381
    Roderick GeisRoderick Geis
    Participant

    Sorry, it's
    <input type="text" required="1" id="stones_group_info_1_stones_full_name" class="rwmb-text" name="stones_group_info[1][stones_full_name]" aria-labelledby="stones_group_info_1_stones_full_name-label">

    and

    The invalid form control with name=‘stones_group_info[0][stones_full_name]’ is not focusable.

    #46401
    PeterPeter
    Moderator

    Hello,

    If you open the Inspect tool of the browser and check the HTML structure, the index 0 is added to the clone template. And the index 1 is added to the field where you input the value.
    This is the new feature of the cloneable field, so please update your code accordingly.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.