Here is the solution I came up with. I enhanced the existing FIAR snippet.
You pass in the file(s) as a json param value
[[!FormIt?
&hooks=`spam,email,enm_FormItAutoResponder,ditsformsaver,redirect`
&fiarAttachFiles=`
[{
"file":"%complete_absolute_file_path_to_file%",
"name":"file1.pdf"
}]`
]]
You will see in the snippet that you can pas the other file properties as well or defaults will remain if not. In your &hook params you want to be sure to call this snippet rather then the original "FormItAutoResponder".
I plan to submit this to the Shawn (FormIt author) as possible inclusion into the base code
"One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow

"
Quote from: aesmith at May 31, 2012, 10:15 AMHere is the solution I came up with. I enhanced the existing FIAR snippet.
You pass in the file(s) as a json param value
[[!FormIt?
&hooks=`spam,email,enm_FormItAutoResponder,ditsformsaver,redirect`
&fiarAttachFiles=`
[{
"file":"%complete_absolute_file_path_to_file%",
"name":"file1.pdf"
}]`
]]
You will see in the snippet that you can pas the other file properties as well or defaults will remain if not. In your &hook params you want to be sure to call this snippet rather then the original "FormItAutoResponder".
I plan to submit this to the Shawn (FormIt author) as possible inclusion into the base code
"One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow

"
Hi Aesmith,
I'm looking to setup exactly what you've done above. Users fills in a form then receives a brochure PDF attachment.
Currently I have setup the standard form and got this working:
http://kform.dns-systems.net/beta/contact-us.html
Used this call: [[!FormItBuilder_BasicExample? &outputType=`dynamic`]]
However to add the next bits of code to add this functionality in, I'm a little lost.
Would you be willing to perhaps list some points that I need to do in order to get this working.
Any help would be much appreciated.
Thanks
Jordan
Zooba Ltd - Web Design & Development, Wales UK
Just realised the code didn't appear:
[[!FormItBuilder_BasicExample? &outputType=`dynamic`]]
Zooba Ltd - Web Design & Development, Wales UK
All of the magic is in the hook "
enm_FormItAutoResponder" and property "
fiarAttachFiles". Are you using all that internally in your FormItBuilder_BasicExample snippet call. I have never used FormItBuilder, I am just working against [[FormIt]] directly.
My guess would be that things are not connecting up correctly when using FormItBuilder OR you are not making the calls in the first place.
The basic steps to make this work would be.
- Get a form working using FormIt
- Get auto responder working using "FormItAutoResponder" the native hook
- Once that is all working with no issues
- Replace "FormItAutoResponder" with "enm_FormItAutoResponder" (this is the native hook with the additional magic)
- pass in the file properties under the key &fiarAttachFiles
"One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow

"
Zooba Ltd - Web Design & Development, Wales UK
@aesmith,
This is exactly what we're looking for! Can you please provide the code for enm_FormItAutoResponder?
Sure no problem. Can you give me a few days. In San Francisco juggling work and conferences so candles are burning quite strong on both ends. I will be back in my office on Friday. Hit me up again if you have not heard from me by then.
"One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow

"