Hide webform components after submission I'm trying to autohide all my webform components after submission. I've tried to add an extra submit handler to the form, but no luck there.
The webform is posted by using AJAX (but nothing is shown in my Console). 

Is there some module or hook I'm overlooking?
I managed to do so with a hook_form_FORM_ID_alter:

function mymodule_form_myformid_alter(&amp;$form, &amp;$form_state, $form_id) {
    if(!empty($form_state['input'])) {
      $items = array('name', 'firstname', 'zip', 'phone', 'email');

      foreach ($items as $value) {
        $form['submitted'][$value]['#type']     = 'hidden';
        $form['submitted'][$value]['#title']    = '';
        $form['submitted'][$value]['#required'] = 0;
      }
      $form['actions']['#type'] = 'hidden';
    }
  }


It's not the most clean way to do so, but it does the trick :)