Is there a way to get the value from a div element within a form instead of using a input?
I know it’s kinda a dumb question, but I just want to know if its possible. Something like PHP DOM?
Or is there a way to possible changing the div to an input when hitting submit?
Thanks,
With Javascript, you can put the div’s content into a (hidden) input right before you submit the form.
It will approximately look like this in jQuery:
Edit: Why are you guys talking about AJAX? There’s no need of using AJAX in this situation!