Hello. Thank you for contacting the Toolset support.
Can you please share problem URL of your form where I can see the issue as well as admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
There was indeed issue with saving the correct sort order for repeating field with add/edit post form.
I've reported that issue to our next level support but fortunately I've added workaround that will help you to resolve this issue as there is no ETA on when the official fix will be made available.
I've added the following code to "Custom Code" section offered by Toolset:
=> hidden link
add_action('cred_save_data', 'ts_save_the_rf_sort_order_manually',10,2);
function ts_save_the_rf_sort_order_manually($post_id, $form_data) {
// if a specific form
if ($form_data['id']==32) {
$field_slug = 'media-gallery';
$field_content = $_POST['wpcf-'.$field_slug];
$sort_order = array();
delete_post_meta($post_id,'wpcf-'.$field_slug);
foreach($field_content as $k=>$v):
$sort_order[] = add_post_meta($post_id,'wpcf-'.$field_slug,$v);
endforeach;
update_post_meta($post_id,'_wpcf-'.$field_slug.'-sort-order', $sort_order);
}
}
Can you please confirm it helps you to fix the sort order issue for your image repeating field.