Field values are not being cleared after selecting different options

  • stephanfecteau
    Asked on June 23, 2024 at 8:59 AM

    Hi

    i have a selection ( check box) with a rule to show or hide 2 other field depending on the selection.

    if i select 10X10 i get an uption to rent equipement for 10X10 then i can select or not, if i do select then change to 10X20 instead it hides the first filed but the value remains since its still selected even if hidden.

    is there a way to clear a field when you switch it to hidden



  • Mary JotForm Support
    Replied on June 23, 2024 at 9:17 AM

    Hi stephanfecteau,

    Thanks for reaching out to us for help. I tried replicating your workflow, but when I changed the option, the field that was associated to the original choice was hidden, but the value was not carried over to the tables page.

    Field values are not being cleared after selecting different options Image 1 Screenshot 20

    In my sample screencast, if the use selects option “b” it will show “test 2” field. Then I changed my selection to “a” and deselected the original choice.

    Can you explain a bit more about the issue, so I can get a better idea of what's happening? If you can share the link to your form, I can check it out and help you with a solution. 

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • Stephan
    Replied on June 23, 2024 at 9:21 AM

    Ok in my case

    If you select 2 it shows test2 that has 200$ value for calculations that can be selected

    But then if I change my mind and select C

    Then test2 gets hidden but it's values remains since it has been selected

    And test3 would show with a different selection and prices

  • Ericson_B JotForm Support
    Replied on June 23, 2024 at 9:30 AM

    Hi stephanfecteau,

    I cloned your form to test it, and I easily replicated the issue. Check out the screencast below to see my results:

    Field values are not being cleared after selecting different options Image 1 Screenshot 30 There is an easy fix for this, we just need to set the Clear Hidden Field Values option to Clear When Hidden in your form's settings. Let me show you how:

    1. In Form Builder, go to the Settings tab.
    2. Click the Show More Options button.
    3. You will have to scroll down and look for the Clear Hidden Field Values option.
    4. Finally, select the Clear When Hidden from the dropdown, and that’s it.

    Field values are not being cleared after selecting different options Image 2 Screenshot 41
    Give it a try and let us know if you have any other questions.

  • Stephan Fecteau
    Replied on June 23, 2024 at 9:33 AM

    Wow

    Thanks so much

    Greatly appreciated


    Stephan Fecteau

 
Your Answer