Forum
Calc Builder Support
Calc Builder supportForums
Public write access is disabled. Please login
Re: How to creat a Java sliders function 02.09.2013 14:00
Hello,
you can use basic sliders from jquery. Create fields as option lists with all your values, insert them at the layout, and use the javascript tab to build sliders based on each option list. For ex: an option list named 'myoptions', with 5 options, will require the following code at js tab:
var select = CB( "#myoptions" );
var slider = CB( "" ).insertAfter( select ).slider({
min: 1,
max: 5,
range: "min",
value: select[ 0 ].selectedIndex + 1,
slide: function( event, ui ) {
select[ 0 ].selectedIndex = ui.value - 1;
}
});
//Hide the original input option if needed
CB( "#myoptions" ).hide();
You'd need to change the name of the field, and the range of numeric values accepted.
Here the full official information page:
http://jqueryui.com/slider/#hotelrooms
All widgets here can be included, replacing the $ sign for the calcbuilder jquery instance 'CB'
Hope this helps, regards
Moonsoft Team
www.moonsoft.es
you can use basic sliders from jquery. Create fields as option lists with all your values, insert them at the layout, and use the javascript tab to build sliders based on each option list. For ex: an option list named 'myoptions', with 5 options, will require the following code at js tab:
var select = CB( "#myoptions" );
var slider = CB( "" ).insertAfter( select ).slider({
min: 1,
max: 5,
range: "min",
value: select[ 0 ].selectedIndex + 1,
slide: function( event, ui ) {
select[ 0 ].selectedIndex = ui.value - 1;
}
});
//Hide the original input option if needed
CB( "#myoptions" ).hide();
You'd need to change the name of the field, and the range of numeric values accepted.
Here the full official information page:
http://jqueryui.com/slider/#hotelrooms
All widgets here can be included, replacing the $ sign for the calcbuilder jquery instance 'CB'
Hope this helps, regards
Moonsoft Team
www.moonsoft.es