Formularfelder in Mail sollen gesperrt werden.
Verfasst: 24.09.2014, 15:23
Hallo Guido,
ich habe mit meinen Formularen folgendes gemacht.
Ein eMail Sende Button eingebaut. Dieser Button sperrt mit die Felder und die dann generierte PDF wird als Anhang in das eMail Programm (Outlook, Lotos Notes, GMail ect.) übertragen. Danach schließe ich die PDF OHNE diese zu speichern. Dann sind die Felder noch frei.
Dazu muss man zwei Java Scripte in den Button einbinden :
1. Java Script :
this.getField("Name").readonly=true;
this.getField("Kundenummer").readonly=true;
this.getField("Telefon").readonly=true;
this.getField("Straße").readonly=true;
this.getField("PLZ").readonly=true;
this.getField("Ort").readonly=true;
this.getField("Anzahl").readonly=true;
this.getField("Anzahl_2").readonly=true;
this.getField("Anzahl_3").readonly=true;
Nun sind alle Felder gesperrt.
2. Java Script :
// This is the form return email. It's hardcoded
// so that the form is always returned to the same address.
// Change address on your form to match the code below
var cToAddr = "max_mustermann@gmx.net"
// First, get the client CC email address
// var cCCAddr = this.getField("email").value;
// Set the subject and body text for the email message
var cSubLine = "Entschuldigung für" + this.getField("Name_Kind_1").value;
var cBody = "Sehr geehrter Damen und Herren,"
// Send the entire PDF as a file attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});
Hier wird im eMail Programm der eMail Empfänger und der Betreff schon ausgefüllt vorbereitet.
Wichtig ist nur das die Eltern dann die PDF am ende nicht lokal speichern.
Vielleicht konnte ich ein wenig helfen.
Gruss Oliver
ich habe mit meinen Formularen folgendes gemacht.
Ein eMail Sende Button eingebaut. Dieser Button sperrt mit die Felder und die dann generierte PDF wird als Anhang in das eMail Programm (Outlook, Lotos Notes, GMail ect.) übertragen. Danach schließe ich die PDF OHNE diese zu speichern. Dann sind die Felder noch frei.
Dazu muss man zwei Java Scripte in den Button einbinden :
1. Java Script :
this.getField("Name").readonly=true;
this.getField("Kundenummer").readonly=true;
this.getField("Telefon").readonly=true;
this.getField("Straße").readonly=true;
this.getField("PLZ").readonly=true;
this.getField("Ort").readonly=true;
this.getField("Anzahl").readonly=true;
this.getField("Anzahl_2").readonly=true;
this.getField("Anzahl_3").readonly=true;
Nun sind alle Felder gesperrt.
2. Java Script :
// This is the form return email. It's hardcoded
// so that the form is always returned to the same address.
// Change address on your form to match the code below
var cToAddr = "max_mustermann@gmx.net"
// First, get the client CC email address
// var cCCAddr = this.getField("email").value;
// Set the subject and body text for the email message
var cSubLine = "Entschuldigung für" + this.getField("Name_Kind_1").value;
var cBody = "Sehr geehrter Damen und Herren,"
// Send the entire PDF as a file attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});
Hier wird im eMail Programm der eMail Empfänger und der Betreff schon ausgefüllt vorbereitet.
Wichtig ist nur das die Eltern dann die PDF am ende nicht lokal speichern.
Vielleicht konnte ich ein wenig helfen.
Gruss Oliver