jQuery/js val() overwriting PHPs' $_POST['field']. How to fix?

Banatoxis

New Member
I've got a pretty complicated (for me!) form validation to do. I did all js and now I'm doing php stuff.The thing is I've put a possibility to copy part of the inputs to other, similar section (recipient -> payer). It's all done by jQuery first copying \[code\]$("input.payer_sth").val()\[/code\] to \[code\]$("input.payer_sth")\[/code\], and then doing it again and again on keyup and blur.All my inputs are built like that:\[code\]<input id="payer_name" name="payer_name" class="foo" type="text" value="http://stackoverflow.com/questions/3677714/<?=$_POST['payer_name']?>"/>\[/code\]as long as the ones that aren't modified by jQuery work all right on submit and "back", the ones that has modified \[code\]val()\[/code\] are empty on back.What's obvious for me is that jQuery is overwriting \[code\]value="http://stackoverflow.com/questions/3677714/<?=$_POST['field']?>"\[/code\] .How can this be fixed?
 
Back
Top