Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Additional words added to file name

Avatar

Level 7

For certain forms, when the user submits the form the file name, as expected, is the name that I gave the form. But additionally, Adobe Acrobat Pro.pdf is added after the file name. See figure. Is there a way to keep the "Adobe Acrobat Pro.pdf" from being added?

Thanks,

MDawn

file name.jpg

5 Replies

Avatar

Level 10

This nasty behavior occurs if the file is dirty (= filled but not saved) in front of the submit.

You can get rid of it with when you execute the script

before you submit the form.

Where to place this script depends on the scripts you use to submit the form.

Try it in the preSubmit:Event of the form, this generally is enough.

Avatar

Level 7

I tried this before and the forms were then submitted blank. Did I put the script in the wrong event of the wrong object?

MDawn

Avatar

Level 7

I have a submit button that "clicks" a hidden button. The hidden button has script that verifies that all

required fields are filled in. Script on that button "clicks" another invisible button which opens email where

the user selects the email recipients.

I put the script you suggested in the PreSubmit event of the form, and then each of the Submit buttons and none of these worked.

Thanks,

MDawn

Avatar

Level 10

Well, this is a very tricky one.

The script sometimes has a negative effect on other scripts if you use it together with them.

I suggest to isolate each step of your scripts by putting them into separate functions in a script object and call them one by one.

Avatar

Level 7

I'm not very experienced with JavaScript so I'm not sure what you mean by " isolate each step of your scripts by putting them into separate functions in a script object and call them one by one..."

Thanks,

MDawn