Re-render current form in submit-hook under certain conditions I have a form: 

function _scratch_tests_for_users() {
  $current_user_number = current_user_number_from_session();
  $form = drupal_get_form("_scratch_forms_test_for_user", $current_user_number);
  return drupal_render($form);
}


With the form callback:

function _scratch_forms_test_for_user($form, &amp;$form_values, $current_user_number) {
  $form["user"] = array(
    "#type" =&gt; "value",
    "#value" =&gt; $current_user_number,
  );
  $form["submit"] = array(
    "#type" =&gt; "markup",
    "#markup" =&gt; "Play number {$current_user_number}",
  );
  return $form;
}


And a submit callback: 

function _scratch_forms_test_for_user_submit($form, &amp;$form_values) {
  if ($form_values["values"]["user"]) &gt; 3) {
    _store_some_stuff();
    return "ready";
  }
  else {
    //...re-render the form.
  }
}


In above example code, I would want to render that form three times, the fourth time, values should be stored. 

Note that my actual code is a lot more complex and has more complex criteria then simply "the first three times"; just to avoid answers like "just copy-paste the form three times" :).
drupal_rebuild_form() constructs a new $form from the information in $form_state.

I think you can also set $form_state['rebuild'] = TRUE; in a validation or submit hook as well to trigger the form rebuild.