Number field with decimals
-
Hello dear @codepeople,
I have yet another question for you. I have a number field on our form. I set it to digits as I want to ensure that the numbers keyboard is by default pulled up on mobile browsers. I added the following code to allow a step of 0.01:
jQuery(document).ready(function($){
$( “#fieldname8_1” ).attr( “step”, “0.01” );
});When I try to enter a value with a decimal point however, the validation still fails stating: “Please enter only digits.”
I inspected the element and it looks like the step was applied but I am still getting this error. How can I fix this?
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Number field with decimals’ is closed to new replies.