dear all

Heard that function with module_action name convention can be used to generate form,
such as user_login() can be used to define a user-login form, then the form id is user_login,then
theme file can be user_login.tpl.php and theme_user_login, and more that the tpl.php file has higher privilige over theme function. am i right?

then how about hook_form, where is the form id and how it is rendered to be html element we see from website page?

regards.
thanks a lot for your help.
God bless you all.

Comments

stefan lehmann’s picture

qinqiu’s picture

thank i will go for it

iainp999’s picture

In addition to the links already posted, you may afterwards want to read up on overriding themable output

qinqiu’s picture

thanks for your additional reference

iainp999’s picture

No problem, good luck!

qinqiu’s picture

dear i found a contradiction from http://drupal.org/node/173880

If your theme implements both a theme function and a
template for a given hook, the theme function will always be used.

and

Creating a file named "user-signature.tpl.php" will tell Drupal that the hook is
now a template after clearing the registry. Any content in this file will now take the place
of the function.

is a challenging problem to you?

thanks for help.
thanks