All pastes #281841 Raw Edit

Mine

public php v1 · immutable
#281841 ·published 2006-12-17 02:53 UTC
rendered paste body
<?php/** * Implementation of hook_help(). */function myform_help($section) {  switch ($section) {    case 'admin/modules#description':      return t('blah myform');  }}/** * Implementation of hook_menu(). */function myform_menu($may_cache) {  $items = array();  if ($may_cache) {    $items[] = array('path' => 'myform', 'title' => t('myform'), 	'access' => user_access('access content'),	'callback' => 'myform_callback',	'type' => MENU_CALLBACK);  }   return $items;}function myform_callback() {$form['inputs'] = array('#type' => 'fieldset','#title' => 'inputs','#tree' => TRUE,);$form['inputs']['name'] = array('#type' => 'textfield','#title' => t('name'),'#default_value' => variable_get('malcolm', 'malcolm'),);$form['submit'] = array('#type' => 'submit','#value' => t('submit'),);$output = drupal_get_form('myform_callback', $form);return $output;}function myform_callback_submit($form_id, $form_values) {return $form_values['inputs']['name'];}