you can wait for someone else eventually to answer you, but if you could explain me a bit more what you want to do ?
<div id="container-i-need-data-from" data-id="1">
</div>
<form id="my-form">
//fields bla bla
</form>
so you want to take data-id
attribute from the div, and submit it with the form ?