My form using custom module is not appearing on my contact us page.I created my .module file and .info file and then active the module as well. Following is the code I had included in my .module file
function custom_form_module_form($form,&$form_state) {
$form['name'] = array(
'#type' => 'textfield',
);
$form['company'] = array(
'#type' => 'textfield',
);
$form['phone'] = array(
'#type' => 'textfield',
);
$form['email'] = array(
'#type' => 'textfield',
);
$form['message'] = array(
'#type' => 'textfield',
);
return $form;
}
and in my template.php file
function custom_form_module_form_theme($existing, $type, $theme, $path) {
$items['custom_form_module_form'] = array(
'render element' => 'form',
'template' => 'page--contact-us',
'path' => drupal_get_path('theme', 'escorts').'/templates');
return $items;
}
and in my page--contact-us.tpl.php I used the following line to call separate fields of a form but its not working.
<?php echo drupal_render($form['name']); ?>
"here custom_form_module=my module name and page--contact-us.tpl.php=my template file and escorts=my theme name"