I know its not possible to directly pass dom element ids to a form submit funcction on the server but what are the best workarounds for this?
Would a hidden field be the only option here?
Im using php.
I know its not possible to directly pass dom element ids to a form submit funcction on the server but what are the best workarounds for this?
Would a hidden field be the only option here?
Im using php.
Yes, you could use a hidden field for this. You could use the onbeforesubmit
or onmousedown
attributes on the submit button and link them to a javascript function. This function you could make finds the id's of whatever elements you need and adds those to the hidden field.
Not sure how to do that exactly, but this should give you some direction.