Conditions Setup: Hide Values from field "X", based on the value selection from field "Y"

  • Profile Image
    wordsburg
    Asked on September 26, 2017 at 12:31 PM

    Hello, 

    My query is regarding below form: 

    https://form.jotform.me/72678926724471


    Below are my requirements: 

    1. If user selects any other option apart from "English" from the field "Source language"  

    then

    User should be allowed to select only "English" as the value from Target language field


    2. User should not be able to select same value in both Source language & Target language.

    Ex: Source Language: Japanese  l  Target language: Japanese (Wrong)
    Source Language: Japanese  l  Target language: English (Right)


    Kindly help how can I acheive

  • Profile Image
    Kevin_G
    Answered on September 26, 2017 at 01:20 PM

    It's not possible to change the field options based on conditions, you can only handle the entire field with conditions so you would need to set different dropdowns with the desired options and show them based on the selection made in the "Source Language" field. 

    Here is a guide that will help you with the show/hide conditions: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    You may alternatively use the Dynamic Dropdowns widget, it will allow to show dropdowns in cascade and handle the options based on previous selections: https://widgets.jotform.com/widget/dynamic_dropdowns 

    This guide will help you adding the widget to your form: https://www.jotform.com/help/252-How-to-Add-a-Widget-to-your-Form 

    I hope this helps. 

  • Profile Image
    wordsburg
    Answered on September 26, 2017 at 01:24 PM

    Hello, 

    How about below?

    2. User should not be able to select same value in both Source language & Target language. 

    Ex: Source Language: Japanese  l  Target language: Japanese (Wrong)
    Source Language: Japanese  l  Target language: English (Right)

  • Profile Image
    Kevin_G
    Answered on September 26, 2017 at 01:46 PM

    That's possible with conditions, here are the steps: 

    1. Add two Form Calculation widgets and add each drop down, source and target language: 

    2. Once the widgets have been added you will need to include the drop down field, please follow the process for both calculation widgets: 

    3. Add a text element that will be displayed if the selected languages are the same: 

    4. The last step is to set up a condition to show the message: 

    Here is an example about how this will work:  https://form.jotformpro.com/72685377257975

    Feel free to clone my form: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    I hope this helps. 

  • Profile Image
    wordsburg
    Answered on November 13, 2017 at 12:14 PM

    Discussion regarding: 
    https://form.jotform.me/73153425359458

    Hi, 

    This worked for me. Please check below snapshot (Source & target languages)

    1510592981Screen Shot 2017-11-14 at 1.08

     

    However, when the user selects another language along with same value it doesn't work. Please check below:

     

    1510593077Screen Shot 2017-11-14 at 1.10



    What do I need? 



    When source language matches with any of the selected option(s) from the Target Language field it shouldn't let user go ahead with the form and provide a message. 

    "Source & Target Languages can't be same"

     

    Kindly help!

  • Profile Image
    wordsburg
    Answered on November 13, 2017 at 12:23 PM

    Discussion regarding: 
    https://form.jotform.me/73153425359458

    Infact I have just realised that this solution is no more a viable one. Unlike previously I have added calculation values to the options. 

     

    For ex: Arabic, French, German has been given a value '1'

    Chinese (Simplified) has been given a value'0.84' 

    This was done to help me calculation of the pricing.

    Now even if Source language is Arabic & Target language is German still its showing the warning message. Please check snapshot below:

    1510594000Screen Shot 2017-11-14 at 1.25 


    What I need is if any of the selected "Target language" field matches with "Source language" field it shouldn't let the user go ahead with the form and provide a message. 


    "Source & Target Languages can't be same"

     

    Kindly help!

  • Profile Image
    Marvih
    Answered on November 13, 2017 at 02:03 PM

    It is because your Source and Target language has an assigned value which is numbers. That is why when you compare them, instead of words they will compare the number.

    Let me get back to you after doing some test on how to work this out.

  • Profile Image
    wordsburg
    Answered on November 14, 2017 at 09:28 PM

    Hi Any update on this?


  • Profile Image
    BJoanna
    Answered on November 15, 2017 at 02:33 AM

    I inspected your form and your conditions. Comparing the numbers will not work because some options have the same value. 

    The solution my colleague Kevin_G provided you will work, but only if you disable Multiple Selections option for the Target Languages dropdown field. If multiple options are selected the error message will not be shown. 

    It could be possible to use the similar method and still to allow multiple options, but it would require a lot of conditions and lot of additional fields (one additional field and one condition for each language option). You will also have to use Update/Calculate field conditional logic to pass the value to hidden fields. Please check this guide:

    How to Insert Text or Calculation into a Field Using Conditional Logic

    Here is my demo form: https://form.jotform.com/73181052789967 

    Please clone my form and check conditions #1, 2, 3 and 4 that I set inside of the form.

    1510730823condition.JPG

    Hope this helps to solve the issue. 



  • Profile Image
    wordsburg
    Answered on November 15, 2017 at 02:55 AM

    But that will slow down the speed of the form. I have already removed many conditions as it was impacting the speed of the mobile. Now again you are suggesting to increase conditions. 

    Kindly let me know alternatives. Below is the discussion i had with your team: 

    https://www.jotform.com/answers/1294654-My-form-is-loading-too-slow-on-my-Wix-website-when-using-mobile-device#14


     

  • Profile Image
    Nik_C
    Answered on November 15, 2017 at 05:30 AM

    With the current setup of your form https://form.jotform.me/73153425359458 the only way I see this working is if the options in source field and options in target field have assigned the same calculation values for each option. For example:

    In source field: 

    1510741582Screen Shot 2017-11-15 at 11.3

    And in target field:

    1510741618Screen Shot 2017-11-15 at 11.3

    And you do that with all options, so when those fields are compared, each option will be compared individually.

    Later on, in calculations, you can simply say deduct target field, and deduct source field, so you will remove those calculation values from the equation and add the values that you intended. And I see that in calculations, you have only few values circulating: 1, 0.947368421, 0.842105263 so it shouldn't be hard to create conditions that will calculate properly.

    And most important, you will not slow down your form by creating a lot of conditions.

    Let us know if this could work for you.

    Thank you!

  • Profile Image
    wordsburg
    Answered on November 15, 2017 at 07:28 AM

    Can you explain this a bit further? 

    Later on, in calculations, you can simply say deduct target field, and deduct source field, so you will remove those calculation values from the equation and add the values that you intended. 

  • Profile Image
    wordsburg
    Answered on November 15, 2017 at 09:55 AM

    After spending so many days I am stuck at this very basic step. Please help me through!

  • Profile Image
    Kevin_G
    Answered on November 15, 2017 at 10:46 AM

    I think my colleague was referring to subtract the values of both selected options, this should end up to have always the same value and trigger the conditions indicating the same option has been selected on both ends. 

    However, I also asked him to confirm this, he may post an update here as soon as he can. 

    Thanks. 

  • Profile Image
    Nik_C
    Answered on November 15, 2017 at 04:08 PM

    I was looking at this issue further, and I think I made a mistake.

    The issue is how you're using the fields in calculations later, so what I suggested will not work.

    But, I would still go with assigning the calculations like I advised above (1,2,3,4,5.. for each option).

    And then, since all languages should have calculation value 1, except these:

    Bahasa Indonesian 0.894736842

    Burmese 0.947368421

    Chinese (Simplified) 0.842105263

    Chinese (traditional) 0.947368421

    Javanese 0.947368421

    Jawi 0.947368421

    Khmer 0.947368421

    Lao 0.947368421

    Malay 0.894736842

    Tagalog/Filipino 0.947368421

    Tamil 0.894736842

    Thai 0.947368421

    Vietnamese 0.947368421

    I'm thinking of, for example, this condition:

    1510779487Screen Shot 2017-11-15 at 10.0

    I would adjust to include all those countries that I listed above as not equal:

    1510779830Screen Shot 2017-11-15 at 10.0

    We do the same for Target language.

    That way we are sure that calculation value for all options is 1, so we put 1 (or nothing since it is multiplying) in the calculation:

    1510779944Screen Shot 2017-11-15 at 10.0

    This has to be done three more times since we have three more numbers as options calculations: 0.894736842, 0.947368421, 0.842105263

    So those options that have those calculation values should be grouped and included in "not equal" conditional logic like we did above.

    Then for options that have, let's say calculation value 0.894736842 we will add that number like we did with number 1 above in calculation.

    Hope it makes sense.




  • Profile Image
    wordsburg
    Answered on November 16, 2017 at 01:19 AM

    Hi, 

    I am having multiple issues with this form creation. Here is one more form breakdown.

    https://www.jotform.com/answers/1299656-Issue-with-the-form-calculations#2

    I feel its wasting quite a bit of my time at the given point and i will revisit this at a later stage. 



    For now I need your support with below form: 

    https://form.jotform.me/73189073459467

    It's the same form but I have removed all calculations and just made simple fields. All I need is: 


    1. When a user selects the same language in Source language & Target language (it can be between multiple selections too), it has to caution the end user that source and target languages can't be the same. 

    2. For a weird reason - Target language field is not expanding by height. I have increase height via CSS by 100. Still, it is the same. Please help me fix it.
     

    3. Fields are jerking when switching between Personal & Business options from "Translation from" field. 


    4. All fields which are on the right side of the screen during editing mode gets misaligned when they are switched to the left during preview or live mode. They are usually switched as some field gets hidden depending on the selection of options. The misalignment has to be adjusted. (Example fields: 4. I would like to, P- Delivery speed, word count, notary delivery options etc.,)


    Kindly help me with CSS for points 2,3,4 & Language match problem. "Desperately" waiting for this solution so that "progress somewhere in life with Jot form"

  • Profile Image
    BJoanna
    Answered on November 16, 2017 at 03:47 AM

    Regarding your first question - Please check an my previous answer on this thread to how this can be done. I am not sure if there is another way to do this.

    I moved your other questiona to separate threads: 

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

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

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

  • Profile Image
    wordsburg
    Answered on November 16, 2017 at 07:25 AM

    Regarding your first question - Please check an my previous answer on this thread to how this can be done. I am not sure if there is another way to do this.

    This doesn't solve. Need some alternative.

  • Profile Image
    candy
    Answered on November 16, 2017 at 09:43 AM

    I've cloned your form named "Clone of Request a quote" in order to investigate it and find a solution.

    I would suggest the same solution with my colleague Kevin firstly by adding two form calculation widgets. After, I have seen that Nik has already given the most spectacular solution regarding this problem that I wouldn't think about it. Please try that solution given by Nik on your form.

    I have seen that all solutions have already suggested by my colleagues. 

    Thanks in advance.