I have a form with 3 input fields. One of the inputs is disabled, while the other two are enabled. The goal is to combine the values entered in the enabled fields to populate the disabled field.
How can this be achieved? Is it possible for the value in the disabled field to update in real-time as the user types into the enabled fields?
https://i.sstatic.net/kW2aA.png
I attempted the following code:
$('#productNameInput').keyup(function(e) {
$("#productIDInput").html($(this).val());
}).keypress(function(e) {
return /[a-z0-9.-]/i.test(String.fromCharCode(e.which));
});
However, it seems that everything I tried is deprecated and I'm unsure of the next steps. Any guidance on resolving this issue would be greatly appreciated. Thank you :)