How to synchronize two text box form values?
This is quite easy:
$("#textBoxA").keyup(function(){
$("#textBoxB").val($("#textBoxA").val());
});
$("#textBoxB").keyup(function(){
$("#textBoxA").val($("#textBoxB").val());
});
This is a more dynamic way using jQuery:
$(document).ready(function() {
$(".copyMe").keyup(function() {
$(".copyMe").val($(this).val());
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input class="copyMe" type="text" placeholder="Enter a text"/>
<input class="copyMe" type="text" />
<input class="copyMe" type="text" />
<input class="copyMe" type="text" />