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
Adding {Title} to email message
December 3, 2007
8:54 am
James
Guest

Please replace the ??? with your data!


[desc]:

 Hi Oliver

 Firstly, thank you so much for the excellent plugin and first rate support!

 I am very new to WP/php and am struggling with what I am sure is a very simple problem.  I would like to add the page title to the email sent from cforms to the user and the admin.

The site I am working on will feature a product on each page with a form to express interest in that product at the bottom of the page.  What I want to do is allow the user to easily express interest in the product using cforms and for the user and the admin to receive a mail saying 'user x likes product y'.

 At the moment I seem to be unable to get that working!  Here is a rough page with an (unstyled) form -> http://www.zambezicollection.com/site/?page_id=15

 I would really appreciate it if you could point me in the right direction with this.

Thanks again and keep up the excellent work!

 James_

December 3, 2007
9:15 am
James
Guest

Sorry, the actual product page example is ->

 http://www.zambezicollection.com/site/?page_id=24 

December 3, 2007
6:21 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

All you should have to do is include the variable {Page} into your admin email (in both TXT and HTML message part) to indicate where the user came from (permalink), e.g.:


{Your Name} [{Email}] would like to know more about {Page}

If you'd like to make use of the actual post/page title, you need to follow this 'work-around' and then you can also use {Title} instead of {Page} (without having to enable T-A-F)

 

December 4, 2007
3:19 pm
James
Guest

Thanks Oliver

 I did this…

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


        $content .= $nl . $indent . $tab . '<input type="hidden" name="comment_post_ID" id="comment_post_ID" value="' . ( isset($_GET['pid'])? $_GET['pid'] : get_the_ID() ) . '"/>';

 

$content .= $nl . $indent . $tab . '<input type="hidden" name="cforms_pl'.$no.'" id="cforms_pl'.$no.'" value="' . ( isset($_GET['pid'])? get_permalink($_GET['pid']) : get_permalink() ) . '"/>';
   
    /* }*/

 

 … but now the emails don't come through at all!

Being an utter noob with php, I am not sure if I have done something else wrong!

Many thanks again for your help and patience.

James

 

December 4, 2007
3:35 pm
James
Guest

Mail just came through, must be a problem with gmail rather than my ham-fisted coding!

Last question Oliver, is there a way that I could position the cform element below the Custom Fields I am using for product data.

Thank you!

December 4, 2007
6:50 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

How did you include cforms in the first place? Via PHP call form your own page template or simply by adding it to the actual page/post content inside the WP editor?

How did you add the custom field data?

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
23 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: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

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

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

Administrators: Oliver (6400), Nicky (3)