cforms II User Forum

Registration is currently disabled.


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
post title in result mail
November 18, 2007
9:36 pm


I am using cforms as an order form for a very basic online shop. People can pick an object (actually a post) and directly order that item from the post's single.php page.

What I want is for the post title to appear in te e-mail I get. I tried with {Permalink} variable and T-A-F enabled, but that didn't work either.

Is there a way to get some post variables passed through to the e-mail? It would actually be nice to know the post name, get the permalink and some other post related variables.

Thanx in advance! 

November 19, 2007
6:05 pm
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

Outside of either T-A-F or the "WP Comment" feature context, the only post related variable is {Page} which references the page it form is one.

If you still would like to use these variables: 

  • {Permalink}
  • {Title}
  • {Excerpt}

…you need to go into cforms.php and comment out the below lines {~1356}:

// if (get_option 'cforms'.$no.'_tellafriend')>0 ){
// }


November 19, 2007
8:12 pm

Thanks for your quick response!

I commented out this part:

/*if ( get_option('cforms'.$no.'_tellafriend')>0 ){… … get_permalink($_GET['pid']) : get_permalink() ) . '"/>'; } */      

But still this is what I get in the Admin e-mail:

a form has been submitted on November 19, 2007, via: :: [IP IP.IP.IP.IP]

while this is the source message:

<p style="background:#fafafa; text-align:center; font:10px arial">a form has been submitted on {Date}, via: {Permalink}::{Title} [IP {IP}]</p> 


Any idea what I'm doing wrong? 


November 19, 2007
8:38 pm
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

Are you sure you've saved your changes, I'm asking since the form (using the above link) still does not show the additional two fields:

<input type="hidden" name="comment_post_ID" id="comment_post_ID"…
<input type="hidden" name="cforms_pl’.$no.’" id="cforms_pl’.$no.’" …

EDIT: Sorry, I should have been clearer: you do need the two lines in-between!

November 20, 2007
10:39 am

Yes, that did it!

¡Muchos gracias!

November 30, 2007
2:06 am

Hi Oliver and fife 

For what it's worth, the ability to pass through post-related variables (without needing to activate t.a.f.) seems pretty useful. 

I've just installed cforms (v6.2) on a local WP test install (2.3.1 – running on a MAMP setup on MacOSX 10.4.11). Similar situation to above, the site consists primarily of product pages (except in this case they are pages, not posts) with a request for quotation form. Passing through the current page title rather than getting the user to re-enter the product name (when they're obviously on that product page) is preferable.

I attempted to use {page}, but that only passed through the root of the wordpress install ('/wordpress/') rather than the page title or url. I am using permalinks. Is this an issue?

Using the hack above, {title} worked. So thanks!

Is there any specific reason you only enable the title, excerpt and permalinks when t.a.f. is enabled? Or should this be a feature request?

November 30, 2007
7:55 am
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

Glad it worked out.

However, {Page} should've worked, too, I'll check into that. Permalinks are great, they should not be an issue at all. Also, once you're back on a live server perhaps you can try {Page} (capital 'P') again, perhaps it's a local issue?

As for T-A-F available post/page data, there is no real limitation I didn't think of any other ones that might be of interest – but I'm happy to stand corrected :-)

What were your looking for?

EDIT: just realized what you were getting at, well, enabling the variables by default just adds a bit of overhead to the form and I usually like to keep it simple. But I do see your point and value to have these variables available with or w/o TAF.

December 4, 2007
11:14 am

Sorry for the confusion, I should have been a bit more clear with my last question… yep, your edited response is what i meant.

I've just downloaded cforms 6.3, having a play with that now – looks fantastic so far. Laughing Thanks for all the time and effort you put in.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
16 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: 3761

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5358

Posts: 18739

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

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

Administrators: Oliver (6400), Nicky (3)