I've found and tried some similar questions in this forum and they just don't work. I think it's because I don't understand correctly. When saving with FDF, I want to save with a file name that is a concatenation of some field names in the form and the save date and time.
First, I tried writing the following code in a text field. The file name as expected is displayed.
var Pink = this.getField("PINK");
var Blue = this.getField("BLUE");
var FNAME = util.printd("yyyymmdd-HHMM-",new Date())+Pink.value+"-"+Blue.value+".fdf";
event.value = FNAME;
And then I created a button and created the following code. I deleted the last line above and added the following. Some are listed below, but all are actually just one line of code. I'm actually trying out more code. But those was all a failure. Because I want to let the user choose where to save the file, the save window must be opened.