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

    How to "clear" a conditional field after previous selection changes

    Asked by oseojoy on August 12, 2013 at 05:42 PM

    My form has a field that works just fine for intended purposes. the field in question is called "how long" and only appears when "package" field is set to longer option from drop down menu. this is good. then when you select your choice from how long, a particular image will appear that will show the extra charge for longer hours.

     

    this is all good.

     

    now if a user decides to go back and change the total hours from longer to anything else on the package field, the how long field will disappear correctly. BUT, the image that was shown from its previous selection of number of hours, will remain, as apparently the choice made before will remain on the how long field even though it is now gone back to hidden mode.

     

    how do i fix this?

     

    URGENT HELP NEEDED HERE! :) thanks I literally have 6 hours to get this looking nice and rather not have to tell them there are some serious bugs that need to wait to be fixed, or at least i can tell them someone has seen it at jotform and level 2 is on it or whatever.

    Page URL:
    http://jotform.co/form/32176991481866

    Selection hidden charge select
  • Profile Image
    JotForm Support

    Answered by jonathan on August 12, 2013 at 08:18 PM

    Hi,

    Unfortunately, just using the "condition" to show/hide fields will NOT CLEAR the existing values on them.

    To clear the original values, an execute process like "clear" or "refresh" should be initiated on the browser. You can test this using the refresh button of the browser, or if you add a "Reset" button on your form -- using the reset button will clear all the values on the form.

    I have a suggested workaround you can do on your form to overcome this limitation within the form builder. You will need to redesign a bit on your form or add additional condition on it. Please refer to the visual guide I have included. (click on the image to zoom in)

     

    Hope this help. Inform us if you need further assistance doing this.

    Thanks.

  • Profile Image

    Answered by oseojoy on August 12, 2013 at 08:36 PM

    I'm not sure if i understand correctlty, let me try

     

    you mean i delete longer from my drop down, instead add a single option radio button with longer as the only option, that say only appears when the package field is filled.

     

    and then have the existing how long drop down conditioned via that new radio longer option?

     

    in this case, does it work the way I am asking here to have a clear effect on the drop down for how long? because thats where the problem is. and then how would my users be able to deselect longer if they change their mind once they see pricing appear?

     

    could you please elaborate on what you meant? I will try to summarize my problem: my issue essentially is that if people change their mind after doing what i need them to do for the how long to appear for them, causing the how long to disappear (and i want them to have the option of changing their mind as much as possible), would any further conditions that were based on how long stop working... ie images will be shown based on how long selection and thus, if how long is going to hide becuase user changes selection, then further down images that showed up with how long also need to go away and hide. not sure if i understood what u said correctly, and not sure even if i did, this would actually fix my problem.

     

    still would appreciate any further assistance you guys cane spare :) thanks

  • Profile Image
    JotForm Support

    Answered by jonathan on August 12, 2013 at 09:51 PM

    Hi,

    you mean i delete longer from my drop down, instead add a single option radio button with longer as the only option, that say only appears when the package field is filled.

    Sorry if its not much clearer the first time. So, I created a sample form to convey how my suggestion exaclty should work. Please test this form

    http://www.jotform.co/form/32238577025859

    This is the condition I setup

     

    If you test the form, you can only move to "next page" if HOUR is selected and "How Long" is filled in.

    OR

    If LONGER is selected and "How Long" is empty.

    Inform us if you need further assistance.

    Thanks.

     

  • Profile Image

    Answered by oseojoy on August 13, 2013 at 01:21 AM

    none of this answers my original questions at all. i still don't see how i can get a field cleared.

     

    using a separate page is not an option here as the whole thing must stay in one view. and I think we have a communication barrier as my form does no work the way you explained and sampled. the HOW LONG option is only if the regular package pricing is not enough for users and adds a different hourly rate per hour, and it is setup to show users various cost breakdowns in a website-themed manner. selecting the longer option, must result in HOW LONG show, and without such a selection it must be hidden. but anyway, this will really not take care of my issue with clearing the now hidden selected option that results in stupid options remaining visible while they shouldnt as it does not clear a hiddrn field.

     

    can i at least please make a possible feature request for this, so that jotform can consider adding a feature that automatically clears any selections made that again by users secondary actions go to hidden mode? I understand it is only possible with clear option on form or refresh on page possible (not sure, wix is weird with submitted forms and wont reload them even with refresh unless ctrl+f5), but there has to be an automatica way for the code to achieve this, it just makes no sense to have a value hidden and its effects not.

  • Profile Image
    JotForm Support

    Answered by jonathan on August 13, 2013 at 03:55 AM

    Hi,

    none of this answers my original questions at all. i still don't see how i can get a field cleared.

    I am sorry if my previous response was not clear enough. But I did try to explain it before when I said

    To clear the original values, an execute process like "clear" or "refresh" should be initiated on the browser. You can test this using the refresh button of the browser, or if you add a "Reset" button on your form -- using the reset button will clear all the values on the form.

     

    To simplify, what I meant was there is no way a field can be cleared of its value by using only conditional field. 

    You will need to use the form's source code to be able to inject custom codes using javascript that can execute "reset" or "clear" function on the form.

    My suggested workaround on this form http://www.jotform.co/form/32238577025859 was to use condition fields to prevent inappropriate answer from the form user so that there will be no need for the "clear" previous value on a field. If you don't give the form user a chance to answer incorrectly, then there is no need to clear/reset a an answer or previous answer.

    Hope this help.

    Thanks.

     

     

     

     

  • Profile Image

    Answered by cheekyface on August 03, 2015 at 08:12 AM

    Can someone confirm whether this is now possible?  I thought i read a post some time ago that it was possible to do this although I can't find anything in searching through the forum.

     

    ...I'm just interested to know if it is possible for fields related to one set of logic to be cleared if the user of the form changes their mind then selects an option that hides any fields that were previously shown and selected or filled.
    I've tried to use the disable field option but it's not really doing what I want.

  • Profile Image

    Answered by cheekyface on August 03, 2015 at 08:28 AM

    ...I just found something that solved my problem. Click here for anyone else who reads this.

  • Profile Image
    JotForm Support

    Answered by EltonCris on August 03, 2015 at 11:36 AM

    @cheekyface, @everyone :)

    Perhaps this is what you need. It should clear conditionally hidden field values.

    Hope this helps!

  • Profile Image

    Answered by ugrinoskiwinner on August 09, 2016 at 05:56 AM

    This new design is confusing me. Where can I find "Clear Hidden Values: now?

     

    I feel I will feel dumb later, but atm really can't find this.

  • Profile Image
    JotForm Support

    Answered by Kiran on August 09, 2016 at 06:46 AM

    @ugrinoskiwinner,

    Your question is moved to a separate thread and shall be answered there shortly.

    https://www.jotform.com/answers/901680

    Thank you!