The Mi-Forms Designer has a robust method to ensure only specific characters are typed into fields. This works great, but sometimes you may want to help the user along by popping a keypad that is catered to the field type.


For example, if the field is a phone number, you may want to show the numeric keypad, but the default keyboard requires you to hit the shift key to enter numerals. You can easily accompolish this by using a bit of JQuery  in your form script.



Place code that looks like this into your AfterOpen even in the JS Editor :

  

// Triggered when the form is opened
function MFAfterOpen() {
	$('#TelephoneNumber').attr('type', 'tel');
}

  

We are simply changing the attribute type of an InkEdit field named TelephoneNumber to tel here, and it opens the telephone keypad on your device when that field gains focus. Simply replace tel with any of the following and you can get a host of useful results including native controls for dates, times, etc:


color

date

datetime

datetime-local

email

month

number

time

url

week