Hi,
I have a webform which on submission generated a View that can be downloaded as a .doc file. I require a copy of the same file to be stored in the server as well. In order to do this I used Webform Rules which will Execute a custom PHP code when "After a webform has been submitted" event occurs. The PHP code I have used is
<?php
$view = views_get_view('trial_webform_download');
$display = $view->preview('views_data_export_1');
file_unmanaged_save_data($display , 'sites/default/files/webform/docs/output.doc', FILE_EXISTS_REPLACE);
?>
output.doc is being generated each time I press submit, but it's not retrieving the data from webfrom which are dynamically filled in in the view.
Comments
Comment #2
_lakshmi_ commented