CGBetter forms file attachments

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ISSL
New Member
New Member
Posts: 8
Joined: Sun Apr 10, 2011 8:10 pm

CGBetter forms file attachments

Post by ISSL »

Hi All,

Has anyone used CGBetterForms with file attachment in the form, as i just can not get this to work and need some advice

so used this in the template ...

<div class="form__item">
<label for="cv" class="form__label">Upload your CV</label>
<input type="file" id="cv" name="cv" value="{$form_data->cv}" data-cgbf-accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.oasis.opendocument.text,application/vnd.apple.pages,application/x-iwork-pages-sffpages">
</div>


But what should go in the form handler to make it send the file with the email?

Kind Regards

Paul
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1713
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBetter forms file attachments

Post by DIGI3 »

I don't think CGBF currently has the ability to create a file attachment, probably just a link to the file. You may need to file a feature request, and/or offer to sponsor or co-sponsor (I recall seeing a few others asking about it, so perhaps it can be crowd-funded).
Not getting the answer you need? CMSMS support options
ISSL
New Member
New Member
Posts: 8
Joined: Sun Apr 10, 2011 8:10 pm

Re: CGBetter forms file attachments

Post by ISSL »

HI,

A link to the file would be good, how can i provide a link to the uploaded file, every option i try just does not work.

Paul
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1713
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBetter forms file attachments

Post by DIGI3 »

I just did a quick test, with this in my template:

Code: Select all

  <label>upload file
    <input type="file" name="file">
  </label>
And the {$file} field was available for use in templates - it contained the full url to the file. So in your email you could include a link like:

Code: Select all

<a href="{$file}">Download file</a>
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Modules/Add-Ons”