Hi All,
We've come into a bit of a challenge.
We want to represent time in a block.
X seconds ago, minutes etc.
But we want to avoid 0 seconds ago as its not natural. We also have an upper limit for how far our data can go back.
As such the Field Slider felt like a perfect solution.
What we'd like to do is have a Field Slider set up as such:
.appendField(new FieldSlider(0,30,60,1), "FIELDNAME")
Where it can go from 0-60 in increments of 1 and initialised at 30.
But We'd like to have it show "live" when the slider is dragged to 0.
But as it extends field_number I'm a bit at a loss at how to modify it in order to get this kind of functionality without breaking a lot of things!
I was thinking one option would be to have it extend field_dropdown. And then build the options as a massive array that's ordered. But I'm not sure where to begin with that.
Any guidance would be greatly appreciated!
Also, as a share to say thank you for reading this far, in trying alternative solutions i realised you can redefine:
this.setInputsInline(!0);
inside a mutator, so that if your block gets too long/short it changes from inline to external.
Best,
Jonty