Combine two fields / Merge two fields

I have a CPT and some Custom fields in it. Two of the fields are wpcf-first-name (text) and wpcf-last-name (text). I have a 3rd field Fullname (text) which I want to be auto-filled with fname+lname. How it can be done?

Solution:
Please add below JS code in your site, you can use the Simple Custom CSS and JS plugin for this: https://wordpress.org/plugins/custom-css-js/


$('input[name="wpcf[firstname]"], input[name="wpcf[lastname]"]').on('blur', function(e) {
var first_name = $('input[name="wpcf[firstname]"]').val();
var last_name = $('input[name="wpcf[lastname]"]').val();
$('input[name="wpcf[fullname]"]').val(first_name + ' ' + last_name);
});

Screenshot here.