I do not see why
inputPhoneNumber.val('00' + inputPhoneCountry + inputPhoneMain);
should not work unless inputPhoneNumber is a type=number in which case it MIGHT remove the leading 0s (but it doesn't)
Try template literals and a text field
inputPhoneNumber.val(`00${inputPhoneCountry}${inputPhoneMain}`);
In testing it does not make a difference
const inputPhoneCountry = 31; const inputPhoneMain = 612345678; $("#inputPhoneNumber1").val(`00${inputPhoneCountry}${inputPhoneMain}`); $("#inputPhoneNumber2").val(`00${inputPhoneCountry}${inputPhoneMain}`);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <input type="number" id="inputPhoneNumber1" /> <input type="text" id="inputPhoneNumber2" />