Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all articles
Browse latest Browse all 16286

Javascript for changing file name

$
0
0

Hi,

 

Is it possible to programmatically change a form's file name? I got this idea while doing a function in VBA (where this is definitely possible).

 

I was thinking of something like this:

event.target.documentFileName = textfield1.rawValue;

 

 

The context is that I have a non-distributed form that is submitted via email (I programmatically generate default email body, subject, and recipient).  But the user can (and does) save the file name whatever name they want.  Now, my forms "know" if they're submitted or not by looking for a flipped checkbox switch upon initialization.  So I'm hoping to automatically change the file name if the app is "recieved".

 

So theoretically, this code would be in the form initialize event:

 

if (submission.rawValue == 1) {

event.target.documentFileName = textfield1.rawValue;

}

 

 

But of course, I haven't been able to access the file name.  Any ideas?


Viewing all articles
Browse latest Browse all 16286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>