I'm using JQueryUi Sortable to sort gallery with user friendly drag and drop.
Thing im sorting looks like :
<div id="gallery"><div class="wrapper" data-id="//here is name of picture like :2017554352.jpg">
//actual picture and desc.. etc.
</div>
<div class="wrapper" data-id="//here is name of picture like :2017554352.jpg">
//actual picture and desc.. etc.
</div><div>
and here actual simple sorting script:
<script>
$( function() {
$( "#gallery" ).sortable();
});
</script>
I want to create php string by inputing data-id's of divs into hidden input in this form. How would function what can do this looks like ?
<form name="sortForm" action="sortPics_submit.php" method="post">
<input type="hidden" id="sortOrder" name="sortOrder">
<button type="submit" class="submit3" name="submit"><span>Save&Continue...</span></button>
</form>
Thank You for any advice !