I'm looking to auto populate a single line field from a dropdown menu. Im not sure if i'm missing something here.
I want the user to select a code and the system should auto populate the general ledger.
I tried a few javascript but it doesnt seem to populate the general ledger
$(document).ready(function() {
$(document).on('.GLacctno input');
}
$(".cf-table-block").on("change", "select",function() {
$('.cf-table-block tbody tr').each(function () {
var chg = $(this).find('.code select').val();
if (chg == "36") {
$(this).find('.GLacctno input').val('123-456-789').trigger('change');
} else {''}
if (chg == "70") {
$(this).find('.GLacctno input').val('987-654-321').trigger('change');
} else {''}
});