I need to have the people who fill out one of my forms, 3 file attachments. The file attachments will not change, and need to be sent to every person who fills out the form. Is it possible to do this? I've looked at so many potential solutions, but their learning curve is atrocious. Help!
Hi Bryan,
That needs a little code in the OnSubmit before box but it is entirely possible. Search here on attachment and you should find it.
Bob
That needs a little code in the OnSubmit before box but it is entirely possible. Search here on attachment and you should find it.
Bob
Well... I found the code, thank you. Problem is: it looks like the code prevents emails being sent to dynamic addresses. If I provide a static "to", it works. Dynamic "to" does not. How do I fix that?
For the record, here is the code🙂
BTW- you can send multiple attachments by duplicating the last line and changing the file name like this:
For the record, here is the code🙂
<?php
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments[] = 'files/vendorlist.pdf';
?>
BTW- you can send multiple attachments by duplicating the last line and changing the file name like this:
$MyUploads->attachments[] = 'files/vendorlist.pdf';
$MyUploads->attachments[] = 'files/another_one.pdf';
Any thoughts? The code ONLY works for static "to" addresses, and I need to have it work for dynamic "to" addresses. I'm hoping it's just a little tweak🙂
Hi Byran,
I can't see any reason why that code would have any affect at all on Dynamic To addresses. What do you have in the Dynamic To box?
Bob
I can't see any reason why that code would have any affect at all on Dynamic To addresses. What do you have in the Dynamic To box?
Bob
Thanks for the reply, Bob—the form collects their email and stores it with <... id="text_7" name="email_to" ...>. So in the Dynamic To box, I have "email_to" (sans quotes). No matter how many times I do it, I don't get an email sent unless it's a static "to". I can't really think of how else to troubleshoot this, either. Can you?
UPDATE: just tested it on another form, and it works. That's... odd. The original form still won't send it, however. Too strange.
UPDATE: just tested it on another form, and it works. That's... odd. The original form still won't send it, however. Too strange.
Hi byran,
Turn Debug on for the form and see if the 'dummy' emails in the Debug info give you any clues.
Bob
Turn Debug on for the form and see if the 'dummy' emails in the Debug info give you any clues.
Bob
This topic is locked and no more replies can be posted.