Static form to print on TPL I have created a module i can use to create multiple blocks, now with one of those blocks, there is a requirement for a form (which the user needs to be able to see). However, this does not require any Drupal "Save" interactions.

Its a very simple static form that is manipulated with Ajax functionality. I have just coded this form simply within the TPL file. 

&lt;form name="formelement" method="post"&gt;
    &lt;input name="data" type="hidden" value="" /&gt;
    &lt;div class="something_here"&gt;something here&lt;/div&gt;
    &lt;div class="something_here"&gt;something there&lt;/div&gt;
    &lt;input required="" type="text" class="" name="blah1"&gt;
    &lt;input required="" type="text" class="" name="blah"&gt;
    &lt;div&gt;
        &lt;button type="submit" class="btn" href=""&gt;submit&lt;/button&gt;
    &lt;/div&gt;
&lt;/form&gt;


Question - I need to be able to get the $_POST in a function - what would be the best method of creating this form with the .module file or the drupal 7 api and then print it within the tpl file
You can create form by develop custom module then you use developed form any where in node or block.

Create a custom module


Create a file sites/all/modules/own/form_test/form_test.info 
Create a file sites/all/modules/own/form_test/form_test.module


(start it with &lt;?php tag, but don't add ending ?&gt; tag)

function form_test_form($form,&amp;$form_submit) {
  $form['firstname'] = array(
    '#title' =&gt; t('Firstname'),
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
  );
  $form['lastname'] = array(
    '#title' =&gt; t('Lastname'),
    '#type' =&gt; 'textfield',
  );
  $form['submit'] = array(
    '#value' =&gt; 'Submit',
    '#type' =&gt; 'submit',
    );
  return $form;
}


More details