Support Article
Decimal option not present on iPhone keyboard
Summary
For iPhone Safari users, the decimal option is not present on the keyboard.
Error Messages
Not Applicable
Steps to Reproduce
Enter a value in a number field (for example, VAT or an amount). The keyboard that displays is a Number only field (no decimal place).
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
For the keyboard to display correctly on the iPhone, modify the Currency control to Number control as below:
- Navigate to Presentation tab > Read only format.
- Set the type as Number and Symbol as None.
Now, the keyboard has all the keys on the iPhone. However, the user is able to enter text as a value and a Validation message is also displayed for a non-decimal input.
Include the below script in UserWorkForm to restrict the user from entering any value other than decimal numbers:
$(document).ready(function(){
$('#Cost').keypress(function(evt){
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
});
});
Published October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.