<?php
function data_menu(){
$items = array();
$items['learning/data'] = array(
'title' => 'Hello Data',
'page callback' => 'drupal_get_form',
'page arguments' => array('hello'),
'access callback' => TRUE,
);
return $items;
}
function hello($form, &$form_state){
$form = array();
$form['hello'] = array(
'#type' => 'fieldset',
'#title' => t('Please login to below'),
);
$form['hello']['username'] = array(
'#type' => 'textfield',
'#title' => t('username'),
'#size' => 50,
);
$form['hello']['password'] = array(
'#type' => 'password',
'#title' => t('Password'),
'#size' => 50,
);
$form['hello']['submit'] = array(
'#type' => 'submit',
'#value' => 'Login',
);
return $form;
}
function data_menu(){
$items = array();
$items['learning/data'] = array(
'title' => 'Hello Data',
'page callback' => 'drupal_get_form',
'page arguments' => array('hello'),
'access callback' => TRUE,
);
return $items;
}
function hello($form, &$form_state){
$form = array();
$form['hello'] = array(
'#type' => 'fieldset',
'#title' => t('Please login to below'),
);
$form['hello']['username'] = array(
'#type' => 'textfield',
'#title' => t('username'),
'#size' => 50,
);
$form['hello']['password'] = array(
'#type' => 'password',
'#title' => t('Password'),
'#size' => 50,
);
$form['hello']['submit'] = array(
'#type' => 'submit',
'#value' => 'Login',
);
return $form;
}
No comments:
Post a Comment