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

    Cannot return dropdown selection to value-when-empty after another selection made.

    Asked by bdoodle on November 15, 2016 at 03:57 PM

    I have two related fields on most of my forms: Spin nbr (a text box) and Spin nbr color (a dropdown box with 5 colors and N/A as value-when-empty) 

    When one is specified, so should the other be, but they can also both be empty. I use conditional field requirements to ensure this. i.e. I have conditional logic that says if the spin nbr field is filled, require the spin nbr color and vice versa.

    In the form I'm working on now that is published via iframe embed, I have a problem even though other forms of mine that use a simple embedded script work fine.  (e.g. http://www.madsails.com/Order_Buccaneer_sails.html)

    THe problem:

    The problem is that if a customer changes the spin nbr color field to a color and then changes his mind, he cannot return to an empty value in spin nbr color even if I specify N/A as a value-when-empty.  Then this forced color selection causes the spin nbr field to be required even if the customer does not want a spin nbr.  (To repeat, in my forms not using iframe, the customer can return to N/A in spin nbr color.)

    So, I added N/A as an option to the dropdown, but it its selection is perceived as filling the field. WHen a customer enters a spin nbr, they should select a color in spin nbr color, not N/A, but N/A fulfills the field requirement. 

    Is there any way to do what I want in an iframe embedded form without creating a hidden error field and showing it when spin nbr is filled and spin nbr color is N/A or empty?

    Page URL:
    http://www.madsails.com/Specify_FS_TR_spinTest.html

    Selection dropdown selection another after
  • Profile Image
    JotForm Support

    Answered by BDAVID on November 15, 2016 at 04:57 PM

    Not really sure what the problem is, I just tested the form, and upon leaving the empty value, the required validation goes away:

    Let us know if you need more help.

  • Profile Image

    Answered by bdoodle on November 15, 2016 at 07:44 PM
    If you enter a sail nbr, it doesn't require that a color be entered in the sail nbr color dropdown. It accepts N/A there, but it shouldn't.
    ...
  • Profile Image
    JotForm Support

    Answered by jonathan on November 15, 2016 at 09:35 PM

    The 2nd rule for the Sail Nbr Color is a conflict of the 1st rule in the conditional statement. I suggest you remove it and test again.

     

    Let us know if this still did not fixed it.

    Thanks.

  • Profile Image

    Answered by bdoodle on November 16, 2016 at 01:38 AM

    Removing the 2nd rule does not solve my problem. As I said before, if you enter a sail nbr, it doesn't require that a color be entered in the sail nbr color dropdown. It accepts N/A there, but it shouldn't.

    Removing the 2nd rule also causes Spin nbr to be required when Spin nbr color is N/A.  That is wrong, so I'm keeping the 2nd rule.

  • Profile Image
    JotForm Support

    Answered by Chriistian on November 16, 2016 at 03:31 AM

    I am currently investigating your form conditions. I will update you on this thread once I have a possible workaround for this issue. Thank you.

  • Profile Image
    JotForm Support

    Answered by Chriistian on November 16, 2016 at 04:12 AM

    It appears that the reason why the N/A "Value-when-empty" option disappears from the dropdown when a user selects a color is due to a custom CSS that was added to the form. This CSS prevents the N/A or empty option from being displayed again in your dropdown field, hence the original problem occurred.

    To resolve this, simply open your form designer, then find and remove the following CSS on your form:

    select > option[value=""] { display: none; }

    Once the css is removed, you will be able to select the N/A "Value-when-empty" option, so you will not need to add the N/A as an option in your dropdown field. You will be able to use the previous conditions which were working on your other forms.

    If you need further assistance, please let us know.
    Regards.

     

  • Profile Image

    Answered by bdoodle on November 16, 2016 at 08:09 AM

    Thank you!  I forgot that that CSS code was there.  I do still have a problem though because that code was added because I don't want my 42 other dropdowns on the form to allow a blank selection.  Is there any way to override that (& allow blank) for the spin nbr color dropdown alone?

    Thanks again.  Your team is great!

  • Profile Image

    Answered by bdoodle on November 18, 2016 at 02:57 AM

    I still have an open question above related to this thread.  Are you looking at this?  Thanks.

  • Profile Image
    JotForm Support

    Answered by emily on November 18, 2016 at 03:48 AM

    If I understood your question correctly, you want to add blank option to spin nbr color dropdown.

    To achieve this, please go to properties of spin nbr color and add &nbsp: as an option as you can see in the screenshot below..

    I hope this solves your problem. If I did misunderstand your question or you have further questions, please let us know.

    Thanks.

  • Profile Image

    Answered by bdoodle on November 18, 2016 at 09:12 AM

    That seems to work perfectly!  Thanks a million!