

Ask HN: jquery ui coding help? - bakztfuture

I don't usually see threads related to coding help on HN but I have had no luck on stack overflow or the jquery UI forums and am desperately in need to further advance a personal project.  I have found HN to have a strong concentration of individuals well versed in jQuery and the javascript language, so any help available would be most sincerely appreciated and am deeply sorry if this is not the right place.
============================================================================================================================<p>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.<p>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.<p>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<p>any help would be sincerely appreciated, thank you!
======
primaryobjects
Instead of just posting the values to the server, why don't you pass the
element IDs as well? You can then name your "link" elements with a key
substring that matches the parent element. When you get your postback, you can
match the "links" with their parent "step" via the key. This way, you don't
rely on the index value in an array. For example:

<input id="step1" />

<input id="step1_link1" />

<input id="step2" />

<input id="step2_link1" />

<input id="step2_link2" />

