Editing Slider code

Hello, I’m trying to add a slider to a form I am creating using wixcode. I would like the slider to range from 20 - 2,000,000, with steps of 1000. currently the slider options only allow a range from 1 - 1,000,000, with a maximum step of 100. is there any way to tweak the code for a large step range and to increase the steps?

many thanks

Hi Russell - Since the slider can be interpreted in code you could simply divide the target values you have by 20. That would change the slider ranges to 1 - 100,000 with steps of 50.

Then you can adjust the actual value returned by the slider by multiplying by 20 before you use it.

Since the target use case you have isn’t clear this would be a solution that should work.


Hello Steve, thanks for you reply. i did try something similar where i set the range from 2 -2000 with steps of 1. then I added ,000 to the suffix so to the user it 2 looked like 2,000.

However it only worked up to 999,999 as it didn’t add the second comma for values over 1000. so 1 million looked like: 1000,000

other than this I wondered whether there was a way of editing the code

@runk40 This should be doable in code. You can set an onChange handler that would allow you to make the necessary calculations. The question is where are you displaying the values? Perhaps more context on your desired outcome would make sense and the page link if you still need help.