Hi:
I'm new on drupal and I'm getting crazy with this issue... I hope somebody can help me...
I wrote a module with a hook_menu to register a url:
$items['user-child'] = array(
'title' => 'Añadir Bebe',
'file' => 'includes/bebe.admin.inc',
'access callback' => 'user_is_logged_in',
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array('bv_child_add_form'),
);
Function bv_child_add_form is the next one (It builds a form):
function bv_child_add_form($form, &$form_state, $class = NULL) {
$form['child_name'] = array(
'#type' => 'textfield',
'#title' => t('Nombre Hijo'),
'#description' => t('El nombre de su hijo'),
'#required' => TRUE,
);
$form['date_select'] = array (
'#title' => t('Fecha de nacimiento'),
'#type' => 'date',
'#description' => t('Fecha de nacimiento'),
'#default_value' => array(
'month' => format_date(time(), 'custom', 'n'),
'day' => format_date(time(), 'custom', 'j'),
'year' => format_date(time(), 'custom', 'Y'),
),
);
return $form;
}
This "page" would be shown in public pages (not admin part).
Question is how can I theme this form in this URL (user-child)?
I already have a page--user-child.tpl.php in my theme but variable $form doesn't exists.