Set min and Max value of a slider based on value of other field

  • Profile Image
    JanLifePlan
    Asked on April 02, 2017 at 08:37 AM

    Hi,

     

    I would like to set the min and/or max value of a slider using the result of another (calculated field).

    So instead of setting :

    Min = 5
    Max = 100

    I would like to use something like

    Min = {Field 1}
    Max = {field 2}....

    where the numeric value of {field 1} and  {field 2} are the result of a calculation.

    The aim is to have a max range in the slider which depends on the outcome of some other conditions.

    EG: if you are younger than 35, you can only pay an amount between 100-500

    If you are younger than 50, the max amoiutn increases to 1000

    If you are younger than 65, you can pay up to 3000

    Abover 65 you can pay up to 5000

    I have made a 'stupid form' with the conditions , now I would like to adapt the MAX value in  the slider 'You can spend' to the calculated amount....

    https://form.jotformpro.com/70913368222959

     

    Possible or not?

    Thanks

     

    Jan

     

     

  • Profile Image
    Jim_R
    Answered on April 02, 2017 at 11:15 AM

    Hey Jan, I'm afraid there's no way to set a field value as your min/max for the Fancy Range Slidr widget (or even in the Numeric Slider widget). These widgets only accept whole numbers for the min/max values. You'd notice that if you enter anything other than numbers for the min/max fields, the sliders will throw a NaN error.

    And I'm afraid there's no way to put this up as a feature request since widgets reside on their respective iframes, thus explaining the limitation.

    Most widgets are standalone apps that were built/designed for a specific task and for these sliders, their main use is to provide a UI on your form that allows users to drag values. The form then takes these values as the input.

    In case you need more help with something else, just open a thread so we can assist you.

  • Profile Image
    JanLifePlan
    Answered on April 02, 2017 at 11:29 AM

    Thanks anyway for your quick response!
    I'll work around it in another way

     

    Jan