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

    Can't make radio button selection when condition is added

    Asked by Alertforce_AU on April 09, 2016 at 09:23 PM

    I have a radio button question in a form to which I have added a set of conditions so that when the user selects a button it replaces the text from the radio button with a number. This is because I am then passing the answers into another external database VIA API which requires the data to be in num format rather than text.  

    However, once I activate this condition and try to test the form, I am not able to make any selection from the radio buttons. I've searched the forums but cant find any clues.

    1) Can please give me a hint as to why this wont work?

    2) Is there an easier way to achieve mapping a set of answer selections to associated numbers or other criteria?



    Page URL:

  • Profile Image
    JotForm Support

    Answered by Mike_G on April 10, 2016 at 06:47 AM

    If I understand your concern correctly and if what I understand base from the conditions on your form is correct, I believe what you need to do is set a calculation value for your radio button field.


    Then, add a Form Calculation widget to your form that will hold the value of the option from the radio button being selected. Set the Form Calculation widget to hidden so it will not show on your form. Then the value that you need to pass to your external database is the value that's held in the Form Calculation widget.

    Here's how it works:

    Note: I have to disable all the conditions affecting the radio button fields to show you how it works. The conditions you set on your form, actually, creates conflict that is why it doesn't allow you to make any selection at all. Also, I have shown the Form Calculation for testing purposes only.

    You just have to do the same to all of the other radio button fields in your form.

    I hope this helps, otherwise, please let us know. Thank you.

  • Profile Image

    Answered by Alertforce_AU on April 12, 2016 at 07:46 AM

    Hi Mike,

    Thanks for your response. It was really helpful and I have constructed all the calculated fields using this method.

    It has left me however with one issue. There is one instance where we have used the output of one field that is dropdown (Course selected) defines the options available for the course date instance fields. The approach I have taken is to have three similar fields with course dates corresponding to the selection of the course. If I select course type 1 then course dates field for course type 1 is displayed and the course date fields for types 2 and 3 are hidden. I repeat this for the other course types and their corresponding dates. The calculation widget then takes the selected course date and converts it into the corresponding course ID number which I have manually entered into the course calculations box in the field settings.

    The problem I am having is that if I select one course and select a date it calculates the corresponding value and puts it into the calculation field. But then if I go and change the course selection and select another date, it iinserts this second value after the first date value and and so on for as many values as I select.

    This is breaking my API integration at the other end because I have to many characters in the field.

    Is there a way to clear the field if the user changes their selection?



  • Profile Image

    Answered by Carina on April 12, 2016 at 09:47 AM

    I will make further tests and will let you know as soon as I have more results.

    Let us know if we can assist you further.   

  • Profile Image

    Answered by Carina on April 12, 2016 at 10:57 AM

    Unfortunately I could not locate calculation fields in the form you mention. Please let us know the form's url so we can perform further tests.

     I created a test form and added values to the dropdown fields:

    It is important to add 0 to the first option as it will be the value on the unselected option.

    You can test and clone the demo form:  


    Let us know if we can assist you further.   

  • Profile Image

    Answered by Alertforce_AU on April 12, 2016 at 11:08 AM

    The form's URL is https://form.jotform.co/61010871708854

    The field that is selecting the course is Name of Certificate course

    It has three options. These options are then used to display or hide the relevant Course Date field of which there are three. The value of the course date field is then used in the calculation of the value of field Course Date Instance which is one of the hidden calculation fields that are being used to change the value of the selection where the data type needs to be different to be accepted by another registration database that has compliance settings. Data is being pushed by zapier from Jotform to Infusionsoft and then via API from Infusionsoft into the final database.

    If you can tell me how I can clear Course Date Instance each time a new entry comes in that would help me.

    I need to do this for another field as well.



    Note: I didnt add 0 as the first field in some cases because these are mandatory fields so they have to be selected before the form is submitted.

  • Profile Image
    JotForm Support

    Answered by david on April 12, 2016 at 12:37 PM

    In your form preferences, under the advanced tab, click on "Show More":

    From the addition options, change "Clear Hidden Field Values" to "Clear On Being Hidden".  This will clear the value for the date field each time one of the date fields is hidden.

  • Profile Image

    Answered by Jeremy  on April 12, 2016 at 07:33 PM

    Did you test this?

    I believe that this solution will not work as the field that is holding the calculation is permenantly hidden rather than being hidden and unhidden.

    can u think of another method that will work? Perhaps   fields 


  • Profile Image
    JotForm Support

    Answered by Chriistian on April 12, 2016 at 10:57 PM

    I checked your form and I see that the calculation field holding the value from the "Course Date" is the "Course Date Instance", which is now visible. 

    It appears that the form is working properly, as when I select an option from the Course Date, then choose another option, the value from the "Course Date Instance" is being replaced instead of simply being inserted to the first value.

    By setting the preference to "Clear on being hidden" the value based on the condition from the Course Date and Course Date Instance will be cleared once the course date is hidden, so the value from the newly selected option will replace the old one in the Course Date Instance.

    If you need further assistance with your form, please let us know.