function init_form() {
    // set the focus
//	$('#tagnum').focus(function(){
//		var that = this;
//		window.setTimeout(function() { that.selectionStart = that.selectionEnd = 10000; }, 0);
//	});
    $('#tagnum').focus();

	// handle input field input
    $('#tagnum').on('change keypress keyup keydown paste input', function() {
    	if (/^[\d]{2,5}$/.test(this.value)) { // 1-5 numbers regex
			$('#submitBtn').prop('disabled', false);
			$('#formHELP').hide();
		}
		else {
			$('#submitBtn').prop('disabled', true); // doesn't match the regex, submit button disabled
			$('#formHELP').show();
		}
	});
    $('#tagnum').trigger('input');
}
