Processes a form array and produces the HTML output of a form.
If there is input in the $_POST['edit'] variable, this function
will attempt to validate it, using drupal_validate_form(),
and then submit the form using drupal_submit_form().
The #pre_render of a form allows us to make changes AFTER validation (unlike
hook_form_alter()), but BEFORE the form has actually been displayed. We use
it to control which form elements are shown, which are hidden, and which values
to set based on…