Nested Clones Break
- This topic has 7 replies, 2 voices, and was last updated 7 years, 2 months ago by
adamdavies.
-
AuthorPosts
-
January 17, 2018 at 5:57 AM #8231
adamdavies
ParticipantHi,
I have created a group of inputs that are clonable and within this group there is another clonable input. I can only see the nested cloneable inputs add button but I can see the parent one for the group in the html given the display none style.
Neither have reached there maximum clones specified. Any ideas?
array( 'name' => 'Create Feature Banners', 'id' => $prefix .'home_banner_features', 'type' => 'group', 'clone' => true, 'max_clone' => 2, 'sort_clone' => true, 'add_button' => 'Add Bannner', 'fields' => array ( array( 'name' => 'Banner Title', 'desc' => 'Enter title for banner', 'id' => $prefix . 'feature_banner_title', 'type' => 'text', 'size' => 60, ), array( 'name' => 'Banner Description', 'desc' => 'Enter description text for banner', 'id' => $prefix . 'feature_banner_desc', 'type' => 'textarea', ), array( 'name' => 'Banner Background Image', 'desc' => 'Select an image for the background', 'id' => $prefix . 'feature_banner_bg', 'type' => 'file_input', 'max_file_uploads' => 1, ), array( 'name' => 'Banner links/buttons', 'id' => $prefix .'feature_banner_links', 'type' => 'post', 'clone' => true, 'max_clone' => 4, 'add_button' => 'Add Button', 'sort_clone' => 'true', // Post type. 'post_type' => array('page', 'post','event', 'course'), // Field type. 'field_type' => 'select_advanced', // Placeholder, inherited from <code>select_advanced</code> field. 'placeholder' => 'Select an item to link', // Query arguments. See https://codex.wordpress.org/Class_Reference/WP_Query 'query_args' => array( 'post_status' => 'publish', 'posts_per_page' => - 1, ) ) ) )
Here is the code in question.
January 17, 2018 at 6:52 PM #8240adamdavies
ParticipantI seem to be able to get the button to appear if I increase the group max_clone value to 5 so I think it is due to a counter that is keeping track. On the face maybe the child clone options are increasing the parent clone as well rather than being independent.
January 19, 2018 at 6:35 PM #8260adamdavies
ParticipantAny ideas?
January 20, 2018 at 10:44 AM #8266Anh Tran
KeymasterHi Adam,
I'm working on it. Please wait.
January 20, 2018 at 7:42 PM #8272adamdavies
ParticipantThanks Anh! Really appreciate it and thanks for keeping me updated.
January 22, 2018 at 10:35 AM #8286Anh Tran
KeymasterHi Adam, I've just fixed it on Github. Can you test it?
January 22, 2018 at 9:48 PM #8291adamdavies
ParticipantThanks Anh.
I will download and test right now for you.
Regards
January 22, 2018 at 9:56 PM #8292adamdavies
ParticipantThat's worked great thank you ?
-
AuthorPosts
- The topic ‘Nested Clones Break’ is closed to new replies.