- JinkfennAsked on May 22, 2017 at 08:47 AM
I need my job form to randomly choose 1 of 8 questions and present it, while hiding the others. Is there a simple way to do this? Right now, I have to use a random generator and then assign numbers to each condition, which is sort of working, but not ideal.
- williamrallomaAnswered on May 22, 2017 at 09:19 AM
Using random function in Form Calculation is the ideal way to do this as of now. Here's how you add one.
1. Setup Calculation widget.
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.
2. 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:
3. Hide the Calculation widget.
To hide, click on the widget, and select the option to hide it (available after clicking on the gear wheel):