What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Updating textbox value when Slider data is changed and vice versa

    Asked by checkrecheck on April 19, 2015 at 09:11 AM

    Hello there,

    I have tried using the slider widgets you provide and they all work fine. I wanted to know whether it's possible to have an additional text box field next to the slider that updates itself as the slider is moved back or forth. I would also like to do the opposite, so that a number is put in the text box and the slider adjusts accordingly. With which widget would this be possible? Thank you

    slider calculation conditions read only
  • Profile Image

    Answered by checkrecheck on April 19, 2015 at 10:27 AM

    Update: I am now set on using the widget 'Slider'. Additionally I have created a text box (with numerical entries allowed only, named 'numbers').

    I have set up a condition using 'update a form field value', and set it in the following way:

     

    IF slider is FILLED

    SLIDER

    output to field

    NUMBERS

     

    Now when I slide the slider, the 'numbers' text box updates automatically, which is great! However, I also want to be able to do the opposite, so that when the numbers in the 'numbers' box are changed, the slider position changes too. Could you please help me with this? :) It is highly appreciated!

     

    Kind regards

  • Profile Image
    JotForm Support

    Answered by Jan on April 19, 2015 at 10:37 AM

    Hi, 

    Before you posted your answer, I created a demo that has a condition exactly like that. However, it is now irrelevant because you've already discovered it. 

    Unfortunately, you cannot include  the slider widget as an output in the calculation. So your 2nd inquiry is not possible.

    Cheers!

  • Profile Image

    Answered by checkrecheck on April 19, 2015 at 10:59 AM

    Hi Jan,

     

    Thank you for your reply. Is there a workaround? Possibly creating your own slider or something in that direction? I ask because it is quite odd for a visitor to enter a number in the text box while the slider stays stuck on another random number.

     

    Many thanks

  • Profile Image
    JotForm Support

    Answered by Jan on April 19, 2015 at 12:40 PM

    Hello there,

    If that's the case then I would recommend you making the result text box not editable. You can do that by enabling the "Read Only" mode in the specific text box field.

    Thanks!

  • Profile Image

    Answered by checkrecheck on April 19, 2015 at 10:15 PM

    Hi Jan,

    Thanks for your reply. However this would not be possible as a specific number of words must be selected, hence a text box in order to fill in numbers is a must...

  • Profile Image
    JotForm Support

    Answered by Welvin on April 20, 2015 at 06:26 AM

    Hi,

    Unfortunately, that is not possible in the form builder. If you know Javascript, you can do this in the form source codes: http://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form.

    I've found the following examples:

    http://stackoverflow.com/questions/23229518/jquery-update-sliders-value-on-text-field-change

    http://stackoverflow.com/questions/13475016/how-to-update-html5-range-on-change-of-a-text-input

    Let us know if you need further assistance.

    Thanks