• Resolved redlik

    (@redlik)


    Hi,
    I’m building a heating calculator and would like the number fields to increase in 0.1 increments instead of full 1+ digits. Is that possible with the plugin out of the box?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @redlik

    I guess you are talking about the spinners included by the browsers in the number fields. If it is the case, simply insert a “HTML Content” field in the form with the following piece of code as its content:

    
    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    fbuilderjQuery('#fbuilder input[type="number"]').attr('step', 0.1);
    });
    </script>
    

    and that’s all.
    Best regards.

    Thread Starter redlik

    (@redlik)

    Thanks for the code. The spinner works as expected but I’m getting the error on the frontend “Please enter digits only” in red.

    Here’s the page I’m working on: https://kerrybiofuels.ie/heating-calculator/

    • This reply was modified 5 years, 4 months ago by redlik.
    Plugin Author codepeople

    (@codepeople)

    Hello @redlik

    The error you are referring is caused by your fields’ settings. You should to select the “number” option for the “Number Format” attribute, instead the “digits” one.

    Best regards.

    Thread Starter redlik

    (@redlik)

    Excellent, all works fine. Keep up the good work with the plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom increment on number field?’ is closed to new replies.