1. theme user registration form
implement hook_theme:
function MYMODULE_theme()
{
$return = array(
'my_custom_registration_form' => array(
'render element' => 'form',
'template' => 'my_custom_registration_form'
),
);
return $return;
}
implement hook_form_alter:
function MYMODULE_form_alter(&$form, &$form_state, $form_id)
{
//dpm($form_id);
if ('user_register_form' == $form_id) {
$form['#theme'] = 'my_custom_registration_form';
}
}
create my_custom_registration_form.tpl.php
file in MYMODULE directory, clear the cache, check if it works;
<?php dpm($form) ?>
copy html from your static file (just form part), put it into my_custom_registration_form.tpl.php
, example (this will be different in your case):
<div class="col-md-4">
<div class=""><?php print render($form['DESIRED_FIELD']) ?></div>
</div>
...
//render other fields (hidden fields), without them submit won't work
<?php print drupal_render_children($form) ?>
// or you can render them manually
// <?php print render($form['form_build_id']) ?>
// <?php print render($form['form_token']) ?>
// <?php print render($form['form_id']) ?>
2. In login form i want to remove tabs LIKE create new account and request new password - you can do it with CSS, or by removing $tabs
variable from page template (you can create specific page template just for login page),
3. enstand of these tab i want to give like just before login button -
with hook_form_alter fnction you can add other fields (manage theme) to the form
P>S: dpm()
- is from Devel module