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 field - reset to default value

    Asked by breeze22 on March 28, 2014 at 05:23 PM

    Hello

    I have a problem on my form. My customers have different selctions to make. In example they may order a coupon (Gutschein) or benefit from a discount (Rabatt).

    If they want to order a coupon they may not use the discount. Therefore I set the condition to hide the discount field if they chose to order a coupon.

    This works great until someone skips this step, chooses a discount and then go back and choose to order a coupon. The calculation field (Preis) then still uses the values from the hidden discount field.

    How can I reset the value to the default value when the field is hidden? Or is there a workaround for this?

    Any help is appreciated
    Thanks
    Mark


    Btw there seems to be a translation error in the german version of the conditions page. In English you may choose if "any" or "all" conditions have to be true. In German it's "Jeder" or "Alle".
    Problem is "Jeder" and "Alle" means the same :)
    So I suggest to translate "any" with "Eine"

    Page URL:
    http://form.jotformpro.com/form/40861930083958

    Screenshot
    translation problem hidden workaround
  • Profile Image
    JotForm Support

    Answered by jonathan on March 28, 2014 at 06:33 PM

    Hi Mark,

    You were right on the part that hidden fields will still retain its value. Logically, this is correct, as the field was only hidden, NOT cleared/reset.

    The only means to clear an input value is to manually do it (go to that field and delete or use spacebar keypress to clear)

    OR to completely clear all the form answers, use the submit RESET button

     

    Hope this help. Please inform us if you need further assistance on this.

    Thanks!

    --

    Btw there seems to be a translation error in the german version of the conditions page. In English you may choose if "any" or "all" conditions have to be true. In German it's "Jeder" or "Alle". 

    Problem is "Jeder" and "Alle" means the same :)

    So I suggest to translate "any" with "Eine"

     

    Thank you for sharing this to us. I will mentioned this to our higher team support so that it can be properly translated.

  • Profile Image

    Answered by breeze22 on March 28, 2014 at 06:43 PM

    Sadly this is not a help. As potential customers are able to abuse the discount possibility they will not use the reset form button.

    Is it possible to put it on the  feature request list?
    I'd like to have the possibility to choose what happens to a field when it goes hidden:
    1: it keeps the current value
    2: it's cleared
    3. It's reset to the default value

  • Profile Image
    JotForm Support

    Answered by jonathan on March 28, 2014 at 08:10 PM

    Hi,

    I understand what you meant. And your suggested feature do have merit.

    I will submit a feature request ticket about it.

    Is it possible to put it on the  feature request list?
    I'd like to have the possibility to choose what happens to a field when it goes hidden:
    1: it keeps the current value
    2: it's cleared
    3. It's reset to the default value

    --

    A workaround that I've come up that should also work, is to force the user to NOT use multiple discount option(this is for your sample case)

    This is by using Condition Logic (-Smart-Forms-Using-Conditional-Logic)

    Here is a sample form http://www.jotform.me/form/40867116124451 that have behaviour like this.

    On the sample form, you cannot apply both Discount, you can only use one.

    I setup the condition like this

     

    Hope this help. Inform us if there is more we can assist you with.

    Thanks!

     

  • Profile Image

    Answered by digiosolutions on May 22, 2014 at 10:30 AM

    I 2nd this feature request. if we can get an option in the conditions to hide to enable us to hide and reset if we chose to, it would save a lot of trouble.

     

    Can this be assigned a higher priority by any chance, I am sure I have asked for this a long time ago under a different username and I remember stumbling across other threads about this too. I am sure your genius devs can do this in no time!

  • Profile Image

    Answered by digiosolutions on May 26, 2014 at 03:29 PM

    SO JOTFORM of you Nicholas!

     

    Love the way these guys work, requests are meaningful here and my appreciation for this team and product and the way they work just cannot and will not go away!

     

    Much respect and thanks

    Omid