I'm pulling data from SQL into multiple single line fields, and based on the characters in those fields, I want to set values for the single line fields that are going to be shown.
Ex: if q119 equals FP, then q120 equals Full Time, else if q119 equals PR, then q120 equals Benefited Part Time, etc.
Below is what I have, but something's wrong bc I can't seem to get it to work.
Any help would be greatly appreciated.
$(document).ready(function() {
$('#q119 input').on('input', function() {
var inputVal = $(this).val();
var typeVal = '';
if (inputVal === 'FP') {
typeVal = 'full time';
} else if (inputVal === 'PR') {
typeVal = 'benefited';
} else {
typeVal = '';
}
$('#q120 input').val(typeVal);
});
});