I have Drupal 7 site. It has custom content type Product. It has 20 fields. I want to control the UI of the add/edit form for this content type.
I created a module under sites/all/modules.
- admin_product
-admin_product.info
-admin_product.module
-admin_product.module
<?php
function admin_product_theme($existing, $type, $theme, $path){
return array(
'product_node_form' => array(
'arguments' => array(
'form' => NULL,
),
'path' => drupal_get_path('theme', 'myTheme').'/templates/forms',
'template' => 'product-node-form',
'render element' => 'form',
)
);
}
In the templates - sites/all/themes/myTheme/templates/forms/product-node-form.tpl.php
-product-node-form.tpl.php
<?php
echo drupal_render_children($form);
echo 'hello template'; // just to test
?>
The template is not rendered.
How do I control the UI of the form.?
Any help highly appreciated.