clone_empty_start not working
- This topic has 7 replies, 3 voices, and was last updated 3 months ago by
Peter.
-
AuthorPosts
-
January 3, 2025 at 6:15 PM #47295
Nicholas Cox
ParticipantHi
When using 'clone_empty_start' to true the front end form does not hide the first group of fields? i am using the latest version of all plugins.
[ 'type' => 'group', 'id' => 'product_package', 'name' => 'product package', 'group_title' => 'Product Package', 'clone' => true, 'sort_clone' => false, 'collapsible' => false, 'default_state' => 'expanded', 'save_state' => false, 'save_field' => true, 'clone_empty_start' => true, 'add_button' => '+ Add product', 'fields' => [ [ 'type' => 'number', 'name' => 'Product', 'id' => 'product_id', 'step' => '1', 'placeholder' => '', //'min' => '0', //'max' => '10000', 'sanitize_callback' => 'absint', 'required' => true, 'columns' => 4, ], ] ]
January 4, 2025 at 11:37 PM #47304Peter
ModeratorHello Nick,
If you enable the field setting
clone_empty_start
, there is no group of fields on initial. When you click on the button "+ Add product", it will show the first group of fields.If it doesn't work on your site, this feature could be affected by a third-party plugin or a block of code in the theme. If so, can you please share the page URL where I can see the issue?
January 5, 2025 at 12:38 AM #47306Tom
ParticipantI have this issue as well and came to this support forum to report it.
"Clone Empty Start" doesn't work (ie the add more button doesn't show up) if you have a value in "Max number of clones" even if "min number of clones" is set to 0.
It shows all the sub fields of the group and not the "add more" button if any value is in the "max number of clones".
January 6, 2025 at 9:07 PM #47311Peter
ModeratorHello Tom,
I set both max and min number of clones for the group field and the feature
clone_empty_start
still works properly.As the next step of troubleshooting, please share your site admin account by submitting this contact form https://metabox.io/contact/
I will take a look.January 6, 2025 at 9:52 PM #47313Tom
ParticipantOkay I will. Can you just check this before I do...
I should of mentioned this is Custom Fields Group assigned to a Settings Page. I just checked a different field group for a custom post type and when I assigned a max value everything worked fine.
January 7, 2025 at 6:20 PM #47322Nicholas Cox
ParticipantHi Peter,
I did some investigation and turns out this CSS call I had in my custom CSS file (not metabox related) was causing the issue. So once I removed this all is working as it should.
.rwmb-form .rwmb-clone.rwmb-clone-template { display: inherit; }
January 12, 2025 at 12:48 AM #47371Tom
ParticipantActual I take my last comment back. On another website I had it also not working for a CPT.
I am sending in a support request.
January 13, 2025 at 10:31 PM #47391Peter
ModeratorThe issue happens when the setting max number of clones set to 1 and if we set it to 2 or more, the setting
clone_empty_start
will work properly. The issue has been escalated to the development team, it will be fixed in the next update of our plugins.Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.