Kontakt

Hier kannst du uns eine Nachricht hinterlassen:

‚textfield‘,
‚#title‘ => ‚Dein Name:‘,
‚#size‘ => ’20‘,
‚#attributes‘ =>array(‚placeholder‘ => t(‚Vorname Name‘))
);
$form[‚email‘] = array(
‚#type‘ => ‚textfield‘,
‚#title‘ => ‚Deine E-Mail‘,
‚#size‘ => ’20‘,
‚#attributes‘ =>array(‚placeholder‘ => t(‚beispiel@email.com‘))
);
$form[‚tel‘] = array(
‚#type‘ => ‚textfield‘,
‚#title‘ => ‚Telefon‘,
‚#size‘ => ’20‘,
‚#attributes‘ =>array(‚placeholder‘ => t(‚+41-000-00000‘))
);
$form[‚text‘] = array(
‚#type‘ => ‚textarea‘,
‚#title‘ => ‚Deine Nachricht‘,
‚#size‘ => ’20‘,
‚#attributes‘ =>array(‚placeholder‘ => t(‚Ihre Nachricht an uns‘))
);
$form[’submit‘] = array(
‚#type‘ => ’submit‘,
‚#value‘ => t(‚Absenden‘),
);
return $form;
}

function my_form_validate($form, &$form_state) {
$valid_email = $form_state[‚values‘][‚email‘];
if (!valid_email_address($valid_email)) {
form_set_error(‚email‘, ‚Sorry. Your email address,‘ . $valid_email . ‚, is not valid. Please submit a valid E-mail address.‘);
}
}

function my_form_mail($key, &$message, $params) {

$headers = array(
‚MIME-Version‘ => ‚1.0‘,
‚Content-Type‘ => ‚text/plain; charset=UTF-8;‘,
‚Content-Transfer-Encoding‘ => ‚8Bit‘,
‚X-Mailer‘ => ‚Drupal‘
);

foreach ($headers as $key => $value) {
$message[‚headers‘][$key] = $value;
}

$message[’subject‘] = $params[’subject‘];
$message[‚body‘] = $params[‚body‘];
}

function my_form_submit($form, &$form_state) {
$valid_email = $form_state[‚values‘][‚email‘];
$from = ‚request@resoxx.ch‘;
$body[] = ‚Email: ‚.$valid_email.‘
URL: ‚.request_uri().‘
Von: ‚.$form_state[‚values‘][’name‘].‘

Telefon: ‚.$form_state[‚values‘][‚tel‘].‘

Nachricht:
‚.$form_state[‚values‘][‚text‘];
$to = ‚info@resoxx.ch‘; // Set this email address – emails will be sent to this email address!
$params = array(
‚body‘ => $body,
’subject‘ => ‚Website Information Request‘,
);

if (drupal_mail(‚my_form‘, ’some_mail_key‘, $to, language_default(), $params, $from, TRUE))
{
drupal_goto(’node/67′);
} else {
drupal_set_message(‚Leider ist ein Fehler aufgetreten. Bitte versuchen Sie es später nocheinmal.‘);
}
}
return drupal_render(drupal_get_form(‚my_form‘));
?>);
}
}

function my_form_mail($key, ,