Dynamic JQuery UI dialogs
Alright so I've seen something like this question around, but I can't really figure out how to make it right...
With a php-loop I'm building a table. Each row of this table represents a question and contains a cell with a link which is supposed to open a JQuery UI-dialog with a standard form in it allowing the user to answer that question.
Now here's the tricky bit. When the user has answered the question the answer need to be submitted to a MySQL-db and it needs the question's id so as to map the two together.
My idea so far is to give the form a <input type='hidden' name='id'> element and make the value-attribute contain the id of the question. However, I can't figure out how to get the id into this input-element.
I can of course put the question's id into the link's id-attribute like this:
... but I don't know how to get it into the form's hidden input field.
Can somebody please help me with this?
Thank you in advance,