I provide how to theme Drupal 7 Forms. in this example is Drupal Commerce Checkout Form
—-
template.php
—-
/**
* Implementation of hook_theme
* Define themes to make style
*/
function yourtheme_theme($existing, $type, $theme, $path) {
$base = array(
'arguments' => array('form' => NULL),
'render element' => 'form',
'path' => drupal_get_path('theme', 'yourtheme') . '/templates/forms',
);
return array(
'commerce_checkout_form_checkout' => $base + array(
'template' => 'commerce-checkout-form-checkout',
),
);
}
/**
* Preprocessor for commerce_checkout_form_checkout theme
*/
function yourtheme_preprocess_commerce_checkout_form_checkout(&$variables) {
/* Stuff with your variables */
}
—-
[yourtheme]/templates/forms/commerce-checkout-form-checkout.tpl.php
—-
<?php
// stuff with $form
?>
Override