Hello @lewisp91
Thank you very much for using our plugin. Assuming the number field is the fieldname123, please, insert an “HTML Content” field in the form and enter the following piece of code as its content:
<script>
fbuilderjQuery(document).one('formReady', function(){
getField('fieldname123').set_step(0.1);
});
</script>
Best regards.
Thank you so much, that worked!
There was a small issue with the numbers as you increased the spinner, such as going 1.1, 1.2, 1.3, then, instead of 1.4 it becomes 1.399999999999999.
I think this is due to how Javascript handles floating point numbers, but I managed to fix it with some additional Javascript that rounded the numbers.
Thank you again.
-
This reply was modified 2 years, 10 months ago by
lewisp91.
Hello @lewisp91
My apologies for the delay in responding to your entry.
We’ve released a plugin update (just now) that includes the following modifications:
- We have edited the Number and Currency controls to support the step attribute. So, you would not need any additional code, only enter the step value through the fields settings.
- Furthermore, we have modified the slider control to make the decimal places in the results more consistent. It will have the same number of decimal places as the step attribute. So, in this case, you can remove the HTML Content field with the custom code.
Best regards.
Wow, you work fast! I just tested the new features and they work perfectly. Thank you so much.
Your dedication to the plugin really shows. Keep up the good work.