While the Formidable Forms PDF addon is a huge timesaver, it's also very frustrating in that there's no way to force it to save the PDF to the server as it's generated each time the user clicks the download link. Here's a workaround (semi-hack) for saving a PDF to the server during its generation via an email notification.
add_filter('frm_pdfs_download_url', 'savePDFToServer', 10, 2); function savePDFToServer( $url, $args ) { $file_download = curl_init(); curl_setopt($file_download, CURLOPT_URL, $url); curl_setopt($file_download, CURLOPT_RETURNTRANSFER, true); curl_setopt($file_download, CURLOPT_FOLLOWLOCATION, true); curl_setopt($file_download, CURLOPT_AUTOREFERER, true); $cookie = $_SERVER["HTTP_COOKIE"]; curl_setopt($file_download, CURLOPT_COOKIE, $cookie); $itemID = $args['shortcode_atts']['id']; $fileName = "file-$itemID.pdf"; // make the file name whatever you want $result = curl_exec($file_download); $path = ABSPATH . "/documents/" . $fileName; file_put_contents($path, $result); return $url; }