Skip to main content
Participant
April 20, 2022
Answered

Aktion SENDEN: Dateiname und Betreff ändern

  • April 20, 2022
  • 1 reply
  • 4768 views

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

This topic has been closed for replies.
Correct answer try67

Hallo,

 

doch, ich habe einen SENDEN Knopf, doch dort kann ich nirgends das Skript hinterlegen.

Wie genau sollich das machen?

 

Gruss,

Chris


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.

1 reply

try67
Community Expert
Community Expert
April 20, 2022

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});

Participant
April 23, 2022

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

try67
Community Expert
Community Expert
April 23, 2022

Don't you have a Submit button in your form?