I have an html form with SOCIAL REASON and FANTASY NAME, so I wanted it when I typed in the "Social Reason" field the "Fantasia Name" field was automatically filled with the same value. Thank you in advance for the help.
I have an html form with SOCIAL REASON and FANTASY NAME, so I wanted it when I typed in the "Social Reason" field the "Fantasia Name" field was automatically filled with the same value. Thank you in advance for the help.
You can do this with jquery using something like this:
$(document).on('keyup', '#razao-social', function() {
$('#nome-fantasia').val($(this).val());
});
$(document).ready(function() {
$('#ID_CONTROLE_RAZAO_SOCIAL').on('keyup', function() {
$('#ID_CONTROLE_NOME_FANTASIA').val($(this).val());
});
});
Place this code snippet in any Script tag, and preferably before the end of the Body tag, remembering to replace the IDs of the controls.