Posted By

sherakama on 04/10/08


Tagged

form textmate functions drupal drupal5


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
Netzach
emoseman


Drupal5 basic form page functions


 / Published in: PHP
 

  1. function web_page_contact_form_page() {
  2. $output .= "<p>&nbsp;</p>";
  3.  
  4. $output .= drupal_get_form('web_page_contact_form');
  5.  
  6. return $output;
  7. }
  8.  
  9.  
  10. function web_page_contact_form() {
  11.  
  12. $form = array();
  13.  
  14. $form['firstName'] = array(
  15. '#type' => 'textfield',
  16. '#title' => t('First Name'),
  17. '#max_length' => 128,
  18. '#required' => TRUE,
  19. );
  20.  
  21. $form['submit'] = array(
  22. '#type' => 'submit',
  23. '#value' => t('Submit'),
  24. '#attributes' => array('style'=>'width:100px;'),
  25. );
  26.  
  27. return $form;
  28.  
  29. }
  30. function web_page_contact_form_validate($f,$fv) {
  31.  
  32.  
  33. }
  34. function web_page_contact_form_submit($f,$fv) {
  35.  
  36.  
  37.  
  38. }

Report this snippet  

You need to login to post a comment.