Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. function mymodule_admin_settings() {
  2.  
  3. $form = system_settings_form($form);
  4.  
  5. $form['functions']['mymodule_pm_mail'] = array(
  6.     '#type' => 'textfield',
  7.     '#title' => t('Message'),
  8.     '#value' => $default_value_mail,
  9.   );  
  10.  
  11.   variable_del('mymodule_pm_mail');
  12.  
  13.   $form['functions']['mymodule_foo'] = array(
  14.     '#type' => 'submit',
  15.     '#value' => t('Submit'),
  16.     '#submit' => array('bla'),
  17.   );
  18.  
  19.  
  20.   return $form;
  21. }
  22.  
  23. function bla() {
  24.   drupal_set_message('Test: ' . $form_state['values']['mymodule_pm_mail']);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement