The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
csv file on submit - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: csv file on submit (/showthread.php?tid=1172) |
csv file on submit - sallymander - Apr 12th, 2011 is there a way to have a csv file sent to the administrator/client on submit? I have set 2 forms up, basic and with API, but i can't figure out if the above is possible. data from forms needs to be imported into FileManager and this would save a step. thanks! Sally RE: csv file on submit - Ben - Apr 30th, 2011 Hi Sally, Sorry I never got back to this. The next few days I'll finally be catching up in the forums - exciting! Technically, yes this is doable - but it would definitely take a some legwork and some PHP knowledge. Here's the general idea: first you'd need to be using the Swift Mailer module to send your emails via SMTP. That module lets you include file attachments. See here for more info on that: http://modules.formtools.org/swift_mailer/?page=file_attachments Then - and this is the tricky bit - you'd need to trigger the creation of the csv file on form submit. There's nothing built-in to allow for this, but I think it's hackable.... The Submission Pre-Parser module lets you execute arbitrary code when the form is submitted: http://modules.formtools.org/submission_pre_parser/ What I'd try is first configuring a new Export Manager CSV field type that's told to create the file on the server (with a predefined filename). Then, in the Submission Pre-Parser rule, maybe use CURL to call the URL that generates the file. Lastly, using the info in that doc page above, add the file attachment to the email template. Sorry it's such high-level technical info, but I just wanted to outline my suggested approach. But yes, you'd definitely need a PHP developer handy to work it all through. Sorry I couldn't be more help! All the best - Ben |