<script>
$( document ).ready(function() {
$('.uc-difform').on('click', '.t-submit', function() {
let ind = $('select[name="location"]')[0].selectedIndex+1;
let services = {
"2" : "d759052b16b1c04edb61ef3deca94127",
"3" : "772f68f2639dc6657dcd04de5e40b47a",
"4" : "80a0aa43188c42933c27abfe98d4bb6f"
};
let svVal = services[ind];
if(svVal != undefined){
let form = $(this).closest('form');
form.find('.js-formaction-services').remove();
let curServ = `<input type="hidden" name="formservices[]" value="${svVal}" class="js-formaction-services">`;
form.prepend(curServ);
};
});
});
</script>