Copy link to clipboard
Copied
Hallo,
ich habe ein ausfüllbares Formular erstellt, welches einen Knopf zum versenden des Formulares beinhaltet. Dort ist eine eMail Adresse hinterlegt und funktioniert auch wunderbar. Allerdings hätte ich jetzt noch zwei Funktionen:
1. Das Formular soll, bevor es als Anhang an die eMail angehängt wird, automatisch umbenannt werden. Hierbei soll der Inhalt eines Feldes, z.B. NACHNAME an den Formularnamen angehängt werden.
2. Die Betreffzeile soll ebenfalls automatisch geändert werden. Hier soll auch der NACHNAME und ein vordefinierter Text, welcher immer gleich ist, stehen.
Ist sowas realisierbar?
Gruss, Chris
1. This is feasible, but requires installing a script on the local machine of each user. Is that possible in your case? If not, the next best thing is to ask the user to save the file under the desired name before they can submit it.
2. Yes, this is also feasible, using a script.
For example:
var lastName = this.getField("LAST NAME").valueAsString;
this.mailDoc({cTo: "me@server.com", cSubject: "Submitted by: " + lastName});
Change the Action associated with the Mouse Up event to "Run a JavaScript" (or the German equivalent thereof) and then you'll be able to paste the code into the editor window:
Note that this action should replace any other actions you have there, not be added to them.
Copy link to clipboard
Copied
1. This is feasible, but requires installing a script on the local machine of each user. Is that possible in your case? If not, the next best thing is to ask the user to save the file under the desired name before they can submit it.
2. Yes, this is also feasible, using a script.
For example:
var lastName = this.getField("LAST NAME").valueAsString;
this.mailDoc({cTo: "me@server.com", cSubject: "Submitted by: " + lastName});
Copy link to clipboard
Copied
Vielen Dank für die schnelle Antwort.
Für Punkt 1 muss ich mir noch ein WorkAround überlegen.
Punkt 2:
Der Vorschlag funktioniert sehr gut. Gibt es noch eine Möglichkeit einen Trigger hinzuzufügen? Ich habe jetzt das Skript einfach irgendwo als verstecktes Textfeld mit BERECHNEN eingefügt. Allerdings wird das Skript jedes mal, wenn ich ein Feld des Formulars ausfülle und weiter klicke, ausgeführt. Ich stelle mir das so vor, dass ich ein Kontrollkästchen einfüge und erst beim Betätigen dieses Kästchens wird das Skript ausgeführt.
Gruss, Chris
Copy link to clipboard
Copied
Don't you have a Submit button in your form?
Copy link to clipboard
Copied
Hallo,
doch, ich habe einen SENDEN Knopf, doch dort kann ich nirgends das Skript hinterlegen.
Wie genau sollich das machen?
Gruss,
Chris
Copy link to clipboard
Copied
Change the Action associated with the Mouse Up event to "Run a JavaScript" (or the German equivalent thereof) and then you'll be able to paste the code into the editor window:
Note that this action should replace any other actions you have there, not be added to them.
Copy link to clipboard
Copied
Vielen lieben Dank.
Ich hatte die Funktionen zum scrollen komplett übersehen.
Jetzt funktioniert es! Danke!
Grus, Chris
Copy link to clipboard
Copied
Hallo Chris,
kannst du deinen Code mal posten, den du benutzt hast?