Support

Account

Home Forums Backend Issues (wp-admin) Number field and step of 10

Solved

Number field and step of 10

  • I’ve added a number field with min value of 1, max value of 5000 and step of 10. I’ve set a default value of 250 as well.

    When I increase the value using keyboard or carets of the field, it always increases the value with 1 first, then 10 as it should be.
    i.e. 250 -> 251 -> 261 -> 271 and so on…

    Moreover, I can’t validate the page if the values is not something like 251, 261, …

    Using ACF Pro 5.3.6.1.

  • Hi @djules

    I believe that’s how HTML5 works with the number input. This page should give you more idea about it: http://www.w3schools.com/html/html_form_input_types.asp.

    If you want it to show 250, 260, 270, etc., you need to set the min value to 10.

    Regarding the validation, the step attribute is used to set the valid number of the number field. Please learn more about HTML5 input types.

    Hope this helps.

  • Hi James,

    Thanks for your reply.
    You stand correct, I need to set the min value to 10 (or zero), that makes sense!

    Cheers!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Number field and step of 10’ is closed to new replies.