Solved

On ipad, use the numeric keyboard when filling an integer field on a smartform

  • 12 April 2017
  • 4 replies
  • 0 views

As the title suggests: how do i get the numeric keypad to show up in a K2 smartform when the datatype is integer. I found that in html it will need the type=number attribute however i need to know how to get this done from K2.

 

 

icon

Best answer by StevenBrown 27 November 2017, 20:04

View original

4 replies

I don't recall this to be something that can be configured in K2. This is a pretty good idea though. You may want to log a feature request to K2 to get this implemented in future versions.

You can change the input type using javascript.  Using the DOM explorer, get the ID of the textbox.  Then in a hidden literal data label, make an expression with the javascript below replacing the element ID with the one you found.

 

<script type="text/javascript">
    document.getElementById('000000*personal details removed*0000_422e535a-13*personal details removed*d9-43*personal details removed*d34d50b3e7').type = 'number';
</script>

 

I think it would be better as a supported feature of smartforms.

Hi All,


 


The marked solution of javascript in a hidden literal control is the known workaround to achieve the desired result at the moment.


 


A feature request has been logged for future implementation of an out of the box method to mark the type property for controls.


 


Thanks,


Colin

we have several text boxes we need this to apply to, is it possible to use a tooltip that is the same, and apply javascript to that tooltip?



rather than make individual expressions for multiple text boxes
@StevenBrown ?

Reply