Randomized questions and conditionally check input text if it is correct

  • 22publishing
    Asked on October 6, 2015 at 11:19 AM

    I need to insert a text question in a box.
    The user need to write a correct answer (need to write NOT to choose from a
    Drop Down OR Radio Button).
    NB: this is 1 of the 5 random question that i need to show to the user and
    if the answer is correct start link download!
    Sorry, how to do this?

  • KadeJM
    Replied on October 6, 2015 at 1:42 PM

    It seems to me that you want a randomized set of questions which you can then allow users to download a file via a link after getting everything correct.

    To do this I would suggest creating your questions via a series of textboxes followed by using conditional logic to only show your download and submit after you assign the correct answers to show your file link via the text field where you could insert it.

    To make them get randomized you'll also need to add our Shuffle Widget.

    Here's an example form that I just threw together to kinda show you how this could work:

    http://form.jotform.us/form/52784995485174?  [CLONE IT!]

    Randomized questions and conditionally check input text if it is correct Image 1 Screenshot 40

    Randomized questions and conditionally check input text if it is correct Image 2 Screenshot 51

    Randomized questions and conditionally check input text if it is correct Image 3 Screenshot 62

  • 22publishing
    Replied on October 7, 2015 at 5:35 AM

    Really thanks for this great support!

    I do my 5 condition logic questions and add Shuffle Widget!

    The problem is that i need to show only 1 question not all 5 questions.

    In other words --> i need that the only 1 random (of 5) questions is showed!

     

    The last problem is that my Submit Button can not linked to a url? Please confirm?

    If the user answer is correct he can click on submit and start a download file...

     

    Thanks again!

  • Ben
    Replied on October 7, 2015 at 10:27 AM

    Since we can assist with only one issue per thread, I have moved your question about the submit button to a new thread here: http://www.jotform.com/answers/677879

    Now in regards to the fields, you can do it in a slightly different manner.

    You can use the random value and based on the number generated, you can show the specific question that you are after.

    Taking the demo form given by my colleague, the changes that would need to be applied are as follows:

    1. Delete the shuffle widget

    Randomized questions and conditionally check input text if it is correct Image 1 Screenshot 50

    2. Add Form Calculation widget to your form

    3. Set it up like so:

    Randomized questions and conditionally check input text if it is correct Image 2 Screenshot 61

    - The random() function generates a number between 0 and 1, so multiplying it by 10 we get a random number between 0 and 9. As we want to be able to use a nice and round number, we place this within the round() function.

    4. Set up conditions

    - Since we have 5 fields and 10 numbers, we can grab 2 numbers for a specific field, so if it is 0 or 1, first field is shown, 2 or 3, the second field, etc. These numbers however do not need to be set like this, they can be set in any manner, so 0 and 9 to show the third field will work as well, as long as we keep the configuration with 2 numbers for a single field and cover all of the numbers and fields.

    So this is how it looks set up:

    Randomized questions and conditionally check input text if it is correct Image 3 Screenshot 72

    Now we just do the same for all of the fields.

    5. Hit save and test it out :)

    You can see how it works by taking a look at this form: http://form.jotformpro.com/form/52794191419968

    Now the only thing that I would add to these steps is to make the calculation widget hidden, which I did not do here so that you can see it in action, but this is rather simple.

    Just click on the widget, and select the option to hide it (available after clicking on the gear wheel):

    Randomized questions and conditionally check input text if it is correct Image 4 Screenshot 83

    Do let us know how it goes and if that is what you wanted to achieve :)

  • 22publishing
    Replied on October 7, 2015 at 5:45 PM
    First: thanks for the support, it's a really great service!
    I do all and works very well!
    ...
  • Welvin Support Team Lead
    Replied on October 8, 2015 at 2:37 PM

    I'm sorry, but I don't think the button is possible. But you can take advantage of our show/hide conditional logic feature. So, you will add a text field and put the message there then show this if the answer to the field is correct.

    Here's the guide: http://www.jotform.com/help/316-How-to-show-or-hide-a-field-in-the-form-based-on-the-other-field-input-or-selection

    Here's a sample form: https://form.jotform.com/52804266096964. Enter "COLOR" in the question.

    You can send the form to support@jotform.com and update us here after so we can check right away.

    Thanks

  • Ben
    Replied on October 9, 2015 at 3:45 PM

    I took a look at the support email, but I did not find any emails from the email address associated with your account, neither an email referencing this thread or the form above.

    If you do not want to share the link to your form, you can let us know what is the issue and a title of the form and we will find it in your account.

  • 22publishing
    Replied on October 9, 2015 at 3:59 PM

    Please Ben, i have here the mail i sent this afternoon to support@jotform.com (Fri, Oct 9, 2015 at 4:30 PM). Subjet: Check form

    My email is saved in my account!

    An the form ID is: 52774145441354

    Please let me know! Thanks!

  • Ben
    Replied on October 9, 2015 at 5:36 PM

    Unfortunately I do not see any email with that exact subject, but I do see the form titled "Musica Jazz Form" in your account with that specific ID.

    Looking at the form, I do see that all of your fields are hidden, so I presume that this is the issue here?

    If so, my suggestion is to replace that lore ispsum them into what you would be using as it is best to apply the conditions at that time (just in case) and see which ones are not working properly.

    We will of course be happy to assist with any issues that you get along the way.

    In regards to the email, please feel free to share your issue here instead.

  • 22publishing
    Replied on October 9, 2015 at 6:45 PM
    Hi, the form is correct.
    I need to have 5 questions but only 1 need to appear to the user random.
    Sure try to change text.
    But nie the problem is that i have a problem to place a hidden field:
    *Congratulations! Your answer is correct!"*
    Like this: https://form.jotform.com/52804266096964
    Please can you check what is my problem!
    On Friday, 9 October 2015, JotForm Support Forum> > wrote:
    ...
  • BJoanna
    Replied on October 10, 2015 at 5:21 AM

    If I understood you correctly you want to have five random questions on your form and that just one is shown and if answer is correct that congratulation text is shown along with submit button. 

    I made new form and I used conditions from form of my colleague Ben a to show random fields and I added "Congratulation' text. I have also added conditions for Congratulation text and submit button.

    Randomized questions and conditionally check input text if it is correct Image 1 Screenshot 20

    Here is my demo form: https://form.jotform.com/52821830059959? 

    Fell free to clone it

    Hope this will help. Let us know if you need further assistance. 

  • BJoanna
    Replied on October 10, 2015 at 6:22 AM

    I have cloned your form, deleted your  lore ispsum questions and added questions from my form. Here is my new demo form: https://form.jotform.com/52822063266958? 

    You can clone it to your account and change your questions and answers. 

    Feel free to contact us if you have any other questions. 

  • 22publishing
    Replied on October 10, 2015 at 7:11 AM

    Hi BJoanna, you are really great!

    i think to have solved but i update you in the next hours.

    Please for privacy delete your demo form: 52822063266958 (i just clone it).

     

    Again thanks!

  • Welvin Support Team Lead
    Replied on October 10, 2015 at 8:41 PM

    That's great to know. Please update us here. 

    As for the form, I'm sure my colleague will read your reply but I just disabled the form to her account.

    Thanks

  • BJoanna
    Replied on October 11, 2015 at 3:29 PM

    @22publishing 

    I have deleted my demo form from my account.