Randomly display questions in Webform - to use as an exam Is it possible to randomly select a fixed number of questions to display in a Webform? I have a request to set up over 500 questions in a webform but for each user who visits the webform, only a random selection of 100 questions will be displayed. The rest will not be displayed. The purpose of this is to use the Webform as an exam/quiz. 

Note: the hidden questions cannot be visible in the code, so CSS or other Javascript hiding techniques are not suitable. 

Any ideas how I might achieve it. 

Thanks a mil

F
You can use form alter to access $form array and display/hide specific elements, more details: https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-programmatically-hide-and-show-webform-elements. 

function CUSTOM_MODULE_form_webform_submission_WEBFORM_NAME_add_form_alter(array &amp;$form, FormStateInterface $form_state, $form_id) {
  $elements = &amp;Drupal\webform\Utility\WebformFormHelper::flattenElements($form['elements']);

  $elements['question_one']['#access'] = FALSE;
  $elements['question_two']['#access'] = FALSE;
}