Rang Slider
-
Is there a way to add a range slider with 2 handles like JQuery’s range slider http://jqueryui.com/slider/#range
Also is there a way to set defined increments that the handle will snap to? For example, say I want a range of 0 – 100 but only want the handle to stop on 10, 30, 50, 88 and 100. http://jqueryui.com/slider/#steps
-
You could make your own field, based of of our existing range slider field, but load up different JavaScript.
Sorry, I am a noob so how would i do that? I have a test form up with the slider, but how do i use diff JS?
Can I ask what steps you have taken so far?
I have setup my form with a slider setting my limits and such but no idea how to load up a diff JS for the other slider.
This isn’t going to work with the default range slider field. You would need to create your own field.
How do I create my own field? Can I get an example or some solid direction? Like I said I am a noob, do you have a step by step on how to create and modify my own field? Is it like a custom field that I have to create in the functions.php or is it a setting I am missing somewhere in your plugin?
You would need to hook into ‘caldera_forms_get_field_types’ to register your new field. Look at the
Caldera_Forms::get_internal_field_types()for how the internal fields are registered. While you’re in there, copy the array for the existing range slider.I would make a plugin that starts by replicating that hook, with the file paths corrected and the JavaScript swapped out and has a copy of the existing field files for checkboxes.
I don’t have a step by step guide for this. I one time copied the AutoComplete field from a custom plugin we made for a client project into Caldera Forms itself to add that feature. That is my whole experience with adding custom field types.
Hmm, more complex that I can handle so marking resolved.
The topic ‘Rang Slider’ is closed to new replies.