WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
How to add custom data with php to the e-mail message (1 post)

  1. hydex31
    Member
    Posted 2 years ago #

    I have tried a lot but i want to make a calculation with de input data of the form.
    I made a functions.php into my theme folder with the following code:

    <?php
    Totalprice="";
    function addinformation_tomail($cf7) {
    Totalprice==$cf7->posted_data["numberofadults"]*10;
    }
    
    add_action( 'wpcf7_before_send_mail', 'addinformation_tomail' );
    ?>

    I assume that i now made calculation of the field numberofadults * 10 and put the result to the variable Totalprice. Now i want to add the TotalPrice to the body of the e-mail message.
    Is there a way to made a custom tag?? Or to do it with a pussarray?

    hope somebody can help.

    http://wordpress.org/extend/plugins/contact-form-7/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic