Conditions to force an answer

  • pretreville.copro.formulaire
    Asked on November 27, 2020 at 6:39 PM

    Hello JotForm,

    I have the following single choice (radio button) question:

    1606519118 5fc1894ea0208  Screenshot 10

    If the user check red OR green then I want all the other questions to be automatically pre-filled and disabled.

    The only way I was able to PARTIALLY do it, is by setting all sub-sequent questions with the desired "selected by Default" answer (although I did not really want to do that as now my form exhibits default answers which can be perceived as a bias)

    1606519334 5fc18a2681cf2  Screenshot 21


    and then the following condition:

    1606519481 5fc18ab995061  Screenshot 32

    This takes care of the red case (please refer to 1st screenshot). In an attempt to take car of the green case, I also added the following condition:

    1606519629 5fc18b4dcf6ac  Screenshot 43

    1606519656 5fc18b6888123  Screenshot 54

    By doing so now the green case works but the red case is not working any more (please refer to 1st screenshot).

    In summary I want a OR logic in between those 2 conditions:

    if: 5. Participation a l'AG et votes

    State: Is Equal To

    Value: Je ne participe pas a l'AG et donne mon pouvoir

    OR

    State: Is Equal To

    Value: Je participe par telephone et donne mon pouvoir

    Do: Disable

    FIELD: 10 APPROBATION DU PROCES-VERBAL DE L'ASSEMB....



    It seems that only the one at the top is taken into account.

    Waiting on your feedback.

    Thank you in advance.


    D

  • John Support Team Lead
    Replied on November 27, 2020 at 7:23 PM

    You can try combining them into a single condition only. Here's an example:

    1606522939 5fc1983b9b094  Screenshot 10

    This works like an "OR" statement. If any of the two criteria are met, the DO-part will be executed.

    Please try that and let us know if you need further assistance.

  • pretreville.copro.formulaire
    Replied on November 28, 2020 at 12:03 PM

    Not sure why I did not manage that the first time!

    Anyway thank you for your help, it works of course.

    Any comment on forcing an answer from a condition please?

    For instance, single choice questions:

    • Q1

    Answer A

    Answer B

    Answer C

    • Q2

    Answer D

    Answer E

    Answer F


    If Q1 answer is A then Q2 answer is automatically set to E and Q2 is disabled.

    The above is what I really would like to have.

    Best regards.

    D


  • Nikola JotForm Support
    Replied on November 28, 2020 at 1:07 PM

    You can use Update/ Calculate Filed conditional logic to populate the Q2 field when the Q1 is equal to Answer A.

    1606586599 5fc290e7d4de2 updatecalculate Screenshot 10

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

    And you can use Enable/ Require Field conditional logic to disable the Q2 field when the Q1 field is equal to Answer A.

    1606586778 5fc2919ac873d disable1 Screenshot 21

    Related Guide: How to Enable/Disable Fields Using Conditional Logic


  • Nikola JotForm Support
    Replied on November 28, 2020 at 1:11 PM

    I forgot to include the link to the second guide and my demo form. Sorry about that.

    Related Guide: How to Enable/Disable Fields Using Conditional Logic

    Demo form: https://form.jotform.com/203324859827060

  • pretreville.copro.formulaire
    Replied on November 28, 2020 at 9:07 PM

    Nik,

    Thanks for that. This is exactly what I wanted. I was able to reproduce your example without trouble. When I try to apply it to my form ... it fails. I clearly need another pair of eyes to catch my mistake.

    Here is the single choice that triggers the conditions (I am showing the full parameterization: General, OPtions, Surveying, Advanced):

    1606614545 5fc2fe11b05f5  Screenshot 10

    1606614584 5fc2fe3882546  Screenshot 21

    1606614629 5fc2fe65cd0a7  Screenshot 32

    1606614667 5fc2fe8b43da7  Screenshot 43

    and here are the update/calculate field condition parameterized on this single choice:

    1606614993 5fc2ffd1ee0a6  Screenshot 54

    After clicking on save:

    1606614806 5fc2ff1675aeb  Screenshot 65

    and here is the single choice parameterization affected by the above single choice:

    1606614921 5fc2ff89cf4be  Screenshot 76

    1606615099 5fc3003bb55a0  Screenshot 87

    1606615141 5fc300650a715  Screenshot 98

    1606615179 5fc3008bbd237  Screenshot 109


    Unfortunately when I answer "Je participe par telephone et donne mon pouvoir" or "Je ne participe pas a l'AG et donne mon pouvoir" to the single choice "Participation a l'AG et votes" "Pour" is not automatically selected as an answer to single choice "APPROBATION DU PROCÈS-VERBAL DE L'ASSEMBLÉE GÉNÉRALE ORDINAIRE 2019".

    1606615629 5fc3024dde693  Screenshot 1110

    I am stucked.

    Thanks in advance for your help.

    Best regards.

    D

  • roneet
    Replied on November 28, 2020 at 11:29 PM

    On testing further I have noticed that the conditions are working as expected. Have you already fixed it?

    1606624151 5fc323977504e 888888888 Screenshot 10

    Thanks.

  • pretreville.copro.formulaire
    Replied on November 29, 2020 at 10:25 AM

    You have direct access to the form. Ok.

    Thank you for trying. I have logged out logged in (just trying random things at that point) and when activating Preview Form, this is what I get when filling the form:

    1606663006 5fc3bb5eec212  Screenshot 10

    I click on "Suivant" I get that:

    1606663054 5fc3bb8e4b425  Screenshot 21

    All good, I click on "Suivant" and this is what I get:

    1606663139 5fc3bbe3d90ab  Screenshot 32

    "Pour" should be selected but it is not!

    Same story with the other condition (the one you are showing me through your screen recording):

    1606663269 5fc3bc653f28d  Screenshot 43Click on "Suivant"

    1606663308 5fc3bc8cdadea  Screenshot 541606663346 5fc3bcb2d1616  Screenshot 65"Pour" should be selected but it is not!

    I am completely confused. You are showing me it is working and I am showing you it is not.

    One difference compare to you is the camera use at item "Veuillez photographier votre carte d'identite pour identification". It seems that you are able to take a picture while I cannot and instead upload a file. Could that explain the different behavior. Note that at the beginning when I was testing I could also take a picture but since few days it seems that the form cannot access the webcam any more and falls back to the file upload.

    I really appreciate your help as I am clue less.

    Best regards.

    D

  • Nikola JotForm Support
    Replied on November 29, 2020 at 11:13 AM

    I have tested your form and the condition is not working on my end as well. After I reviewed the condition I noticed that you are trying to pass the value to the PDF Embedder widget (field #11 - 2°. APPROBATION), not to the Single Choice field (field #12 - 2°. APPROBATION), so it seems that you accidentally selected the wrong field.

    Please update your condition, select the correct field, and test the form again.

    1606665860 5fc3c68493065 conditionwrongf Screenshot 10

    Cloned Form: https://form.jotform.com/203334640372953

    I updated the condition on my cloned form. Please test it to see if it working properly.

    The issue with the Take Photo widget is not related to the subject of this thread. To avoid confusion, I created a new thread for that issue - https://www.jotform.com/answers/2732324

    I will update you on the other thread shortly.

  • pretreville.copro.formulaire
    Replied on November 29, 2020 at 11:45 AM

    Pfffff same "title" indeed and I got confused. I can only apologize for wasting your ressources (and mine!! :-)) but as I said, at that point I really needed someone to show me my crap in front of my eyes. Thank you for that.

    I made the correction and all is working accordingly.

    Best regards.

    D