Hallo,
kennt sich jemand aus mit dem Formular was über mailhandler.php, forms.js, und MailHandler.ashx läuft.
Ich habe in diese Datein eine vorgabe von 3 feldern + das nachrichten feld.
Ich wollte das ganze jetzt um 3 eingabe felder erweitern, aber er nimmt das nicht, die mail wird verschickt alles okay, aber ohne diese 3 neuen felder.
Kann mir hier jemand weiterhelfen ?
Gruß
koshiro
Hier mal die auszüge die ich versucht habe zu änderrn.
PHP-Code:
if($_POST['kurs']!='nope'){
$messageBody .= '<p>Kurs: ' . $_POST["kurs"] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['name']!='nope'){
$messageBody .= '<p>Name: ' . $_POST["name"] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['anschrift']!='nope'){
$messageBody .= '<p>Anschrift: ' . $_POST['anschrift'] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['ort']!='nope'){
$messageBody .= '<p>Ort: ' . $_POST["ort"] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['phone']!='nope'){
$messageBody .= '<p>Telefon: ' . $_POST['phone'] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['email']!='nope'){
$messageBody .= '<p>Email: ' . $_POST['email'] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}else{
$headers = '';
}
if($_POST['fax']!='nope'){
$messageBody .= '<p>Fax Number: ' . $_POST['fax'] . '</p>' . "\n";
$messageBody .= '<br>' . "\n";
}
if($_POST['message']!='nope'){
$messageBody .= '<p>Message: ' . $_POST['message'] . '</p>' . "\n";
}
PHP-Code:
messageBody += "<p>kurs: " + context.Request.Form.Get("kurs") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>Visitor: " + context.Request.Form.Get("name") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>anschrift: " + context.Request.Form.Get("anschrift") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>ort: " + context.Request.Form.Get("ort") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>Email Address: " + context.Request.Form.Get("email") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>Phone Number: " + context.Request.Form.Get("phone") + "</p>\n";
messageBody += "<br>\n";
messageBody += "<p>Message: " + context.Request.Form.Get("message") + "</p>\n";
PHP-Code:
,submitFu:function(){
_.validateFu(_.labels)
if(!_.form.has('.'+_.invalidCl).length)
$.ajax({
type: "POST",
url:_.mailHandlerURL,
data:{
kurs:_.getValFromLabel($('.kurs',_.form)),
name:_.getValFromLabel($('.name',_.form)),
anschrift:_.getValFromLabel($('.anschrift',_.form)),
ort:_.getValFromLabel($('.ort',_.form)),
email:_.getValFromLabel($('.email',_.form)),
phone:_.getValFromLabel($('.phone',_.form)),
fax:_.getValFromLabel($('.fax',_.form)),
state:_.getValFromLabel($('.state',_.form)),
message:_.getValFromLabel($('.message',_.form)),
owner_email:_.ownerEmail,
stripHTML:_.stripHTML
},
success: function(){
_.showFu()
}
})
},