cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Email attachment - multiples and use of variables
February 13, 2013
12:28 am
Allen
Guest

I did a forum search and went back about a year, and didn't find an answer.

First, as far as email confirmation with multiple attachments – please add me as another requester for this feature.

I too have multiple white papers/documents that I want to be sent with the confirmation email. cforms II is the closest I've been able to find that does this easily in WP.

Today, I'm going to do separate forms for each document.  To ease things for future deployments, is it possible to pass a variable to the attachment field? i.e.

filename=document1.pdf

/uploads/{filename}

I could then possibly use the referring page variable to change the filename variable.

Like:

if $page = \"DocumentDownload2\" {

$filename=\"document2.pdf

}

I think I could do this with existing (almost) code if I could tell the hidden field to return the {Page} variable, and reset the page variable – eg: {Page}='{Page}.pdf' and set the variable in the attachment field (now would be /uploads/{Page}

I'm not much of a php script writer..

Suggestions?

Thanks!

February 17, 2013
7:14 pm
Allen
Guest

Ok, so after several trials and tribulations, I've found that I'm not a good enough coder to make this happen;

My biggest problem was trying to tell if my custom fields were getting past to cforms. I finally found that turning on tracking could show me that they were being passed.

I tried other angles at this -

Tried putting variable into referring page, and then using that variable in the custom redirect page.  Again, that field does not accept variables.

What I finally did is use a multi-select menu with an assigned field name. In each selection I then put full HTML for a link to the file download location.  Calling the main field variable in the confirmation email provides all the selected sub-fields.

example:

WhitePapers#White_Paper_1|<br><a href="http://www.foo.com/paper1/">White Paper 1</a>#White_Paper_2|<br><a href="http://www.foo.com/paper2/">White Paper 2</a>#White_Paper_3|<br><a href="http://www.foo.com/paper3/">White Paper 3</a>

The issue then was to get the HTML right so the selected URL's came out in a list, since by default they are provided with nothing more than a comma between them.  I finally was able to get this to format correctly using HTML in the field and the Confirmation email.

While this isn't my ideal world sf-smile it will do until someone can give me a better hint on how to pass a variable into either the redirect page or the file attachment settings.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
28 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3744

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5345

Posts: 18714

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)