Quote from Chillcoder on August 24, 2024, 2:54 amHi.
I have a numerical field limited to 4 characters. So 2.47 by example is OK but 2.477 would not be.
What I have noticed is that the field entry just goes blank if more than the limit entered after you proceed to next screen and return to view the entry, but no error is captured or can be displayed. You are able to enter more than the allowed limit and seemingly no way of capturing the error.
The field variable is neither a zero nor blank text so also cannot be captured with an if statement on checking its status after entry.
Is there a way of preventing the extra decimals being entered? Java script for the field to correct to 2 decimals would be perfect. Or just capturing that the field is beyond the limit allowed.
Thanks
Hi.
I have a numerical field limited to 4 characters. So 2.47 by example is OK but 2.477 would not be.
What I have noticed is that the field entry just goes blank if more than the limit entered after you proceed to next screen and return to view the entry, but no error is captured or can be displayed. You are able to enter more than the allowed limit and seemingly no way of capturing the error.
The field variable is neither a zero nor blank text so also cannot be captured with an if statement on checking its status after entry.
Is there a way of preventing the extra decimals being entered? Java script for the field to correct to 2 decimals would be perfect. Or just capturing that the field is beyond the limit allowed.
Thanks
Uploaded files:
Quote from asmat on August 26, 2024, 6:22 amI recommend using jQuery Input Mask for this scenario. Please refer to the attached example for more details.
I recommend using jQuery Input Mask for this scenario. Please refer to the attached example for more details.
Uploaded files:Quote from Chillcoder on August 26, 2024, 6:52 amThank you for your help.
I am trying to work out how that is connected to the example I sent but will have a go ;-)
I was hoping for an easy error trap solution to force the right entry and still wondering why the error causes the field to go blank and no error can be caught.
Anyway thank you again.
Thank you for your help.
I am trying to work out how that is connected to the example I sent but will have a go ;-)
I was hoping for an easy error trap solution to force the right entry and still wondering why the error causes the field to go blank and no error can be caught.
Anyway thank you again.

Quote from luishp on August 26, 2024, 10:50 am@jason-roberts please check the attached sample.
SetKeyboard "TextInput1" "decimal" SetKeyboard "TextInput2" "decimal" SetKeyboard "TextInput3" "decimal" slAllowedChars "TextInput1" "0123456789," slAllowedChars "TextInput2" "0123456789," slAllowedChars "TextInput31" "0123456789,"I have used TextInput as it is quite more versatile than NumericInput.
Also, do not use the input variable in place-holder. It has not sense.
Kind regards.
@jason-roberts please check the attached sample.
SetKeyboard "TextInput1" "decimal" SetKeyboard "TextInput2" "decimal" SetKeyboard "TextInput3" "decimal" slAllowedChars "TextInput1" "0123456789," slAllowedChars "TextInput2" "0123456789," slAllowedChars "TextInput31" "0123456789,"
I have used TextInput as it is quite more versatile than NumericInput.
Also, do not use the input variable in place-holder. It has not sense.
Kind regards.
Quote from Chillcoder on August 26, 2024, 11:37 amPerfect!!
I had no idea you could limit text fields as numeric. Very useful and works on mobile too.
Thank you.
Perfect!!
I had no idea you could limit text fields as numeric. Very useful and works on mobile too.
Thank you.