Save fillable form using the "project title" form field data as the file name
I do not know javascript, but need to create a button action in a pdf form that will save the document using the "project title" form field data as the file name. Below is what I have pulled together and have no luck. When I hit save, nothing happens. I've read through the posts and see similar questions, but can't figure anything out.
// Get the value of the form field
var fieldValue = this.getField("projecttitle").value;
// Create a file name using the form field value
var fileName = fieldValue + ".pdf";
// Save the PDF with the specified file name
this.saveAs(fileName);
