Hi,
Yes, that’s possible, but you will need a calculated field as intermediary. Please, visit the following link to the plugin’s documentation page, with the instructions:
http://cff.dwbooster.com/documentation#assign-slider-value-programmatically
Best regards.
Thread Starter
asch78
(@asch78)
Thank for your your reply.
But the script only change the pointed slider value.
I tried to change some variables with ‘min’, ‘max’, or ‘predefinedMin’, ‘predefinedMax’, but it should miss something, or the syntax is incorrect, I don’t know.
Another example :
I have 2 radio buttons, 1 calculated fields, and 1 slider.
If the calculated field return ‘A’, the min slider value should be 10, max 80, and step 5.
If the calculated field return ‘B’, the min slider value should be 30, max 120, and step 10.
Hi,
If you don’t want touch the code, you can insert multiple slider controls, and define them as dependent fields of the radio buttons.
However, if you want to use only one slider control, and vary its min, max, step, and value, from the equation, the code in the demo should be edited as follows:
function setSliderValue( clss, value, min, max, step )
{
var id = fbuilderjQuery('.'+clss+' input').attr( 'id' );
var fId = id.match(/_\d+$/);
var field = fbuilderjQuery.fbuilder.forms[fId].getItem(id);
field.setVal(value);
field.min = min;
field.max = max;
field.step = step;
field.after_show();
}
Now you should call the function, but remember to pass the rest of the parameters.
Best regards.