You are here

function webform_variable_get in Webform 6.2

Same name and namespace in other branches
  1. 5.2 webform.module \webform_variable_get()
  2. 6.3 webform.module \webform_variable_get()
  3. 7.4 webform.module \webform_variable_get()
  4. 7.3 webform.module \webform_variable_get()

Retreive a Drupal variable with the appropriate default value.

2 calls to webform_variable_get()
webform_client_form_submit in ./webform.module
webform_form in ./webform.module
Implementation of hook_form(). Creates the standard form for editing or creating a webform.

File

./webform.module, line 2325

Code

function webform_variable_get($variable) {
  switch ($variable) {
    case 'webform_default_from_name':
      $result = variable_get('webform_default_from_name', variable_get('site_name', ''));
      break;
    case 'webform_default_from_address':
      $result = variable_get('webform_default_from_address', variable_get('site_mail', ini_get('sendmail_from')));
      break;
    case 'webform_default_subject':
      $result = variable_get('webform_default_subject', t('Form submission from: %title'));
      break;
  }
  return $result;
}