Essentially, I have a form with a button that creates input fields. Once that input field is created, users are given the option to click the "add media" button which allows them to paste a link inside of an additional input field created. The first set of input fields are "sortable" and can be moved into different positions in the list.
When a new add media field are created and the form is submitted, how can I figure out which parent input field it belongs to? I need to be able to know which parent it belongs to so I can transfer the data via jSON and process it with php.
the main snippet of code that I have written which creates the JSON data can be found on the SO thread: http://stackoverflow.com/questions/14065552/organizing-values-of-child-elements-for-processing-of-a-draggable-form
any help would be sincerely appreciated, thank you!