Load AJAX form on every page via drupal_get_form I'm trying to load this contact form on every page via drupal_get_form()

&lt;?php
function MYMODULE_menu() {
    $items = array();
    $items['contact'] = array(
        'title' =&gt; t('Contact'),
        'description' =&gt; t('Contact'),
        'page callback' =&gt; 'contact_page',
        'access callback' =&gt; TRUE,
        'type' =&gt; MENU_CALLBACK
    ); 
    return $items;
}

function contact_page () {
     $output = '&lt;div id="ajax_contact_form"&gt;'.drupal_render(drupal_get_form('ajax_contact_form')).'&lt;/div&gt;'; 
}

function ajax_contact_form($form, &amp;$form_state) {
    $form = array();
    $form['name'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Name'),
        '#required' =&gt; TRUE,
    );

    $form['submit'] = array(
        '#type' =&gt; 'submit', 
        '#ajax' =&gt; array(
            'callback' =&gt; 'ajax_contact_callback', 
            'wrapper' =&gt; 'ajax_contact_form', 
            'name' =&gt; 'submit1',
            'method' =&gt; 'html', 
            'progress' =&gt; array(
                    'type' =&gt; 'throbber',
                    'message' =&gt; t('Message is sending...'),
                ),
        ),
    '#value' =&gt; t('Send'),
    );
    $form['box'] = array(
    '#type' =&gt; 'markup', 
    '#prefix' =&gt; '&lt;div id="box"&gt;', 
    '#suffix' =&gt; '&lt;/div&gt;', 
    );
  return $form;
}

function ajax_contact_callback($form, &amp;$form_state){
    drupal_validate_form('ajax_contact_form', $form, $form_state);
    $name =  $form_state['values']['name'];
    if (form_get_errors()) {

        $form['box']['#markup']='&lt;div class="ajax_message ajax_error" &gt;'.t('Please check your fields!').'&lt;/div&gt;';
        $form_state['rebuild'] = TRUE;
        return $form;
    }
    return $form;
}
?&gt;


Basically everything is works on /contact page but when I try to load this form from page.tpl.php. It doesn't want to validate. What should I do?

&lt;?php  print render(drupal_get_form('ajax_contact_form'));  ?&gt;


Here
I solved this issue, problem was in 'wrapper' so this is how it works

&lt;?php  print '&lt;div id="ajax_contact_form"&gt;'.drupal_render(drupal_get_form('ajax_contact_form')).'&lt;/div&gt;';  ?&gt;