We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14779
    • 256 Posts
    I have an event registration form powered by eform, you can see it in action here: http://ww4w2009.com/vendor-registration.html

    There are several options that affect the total price that a vendor pays, and I was wondering if there is a way to have the total displayed on the thankyou page, and in the autoresponder email.

    Right now, the thankyou page is just showing the options, and how much they cost with pricing examples.

    If you test out the form, just put test as the first and last name.



      PM me to find out how you can get a FREE ipad 2!
      • 30223
      • 1,010 Posts
      Use the eFormOnValidate event and do any calculations in the event function, then set the total in the fields array and provide a placeholder for this in your report templates:

      <?php
      if(!function_exists('efCalculateTotals'){
         function efCalculateTotals(&$fields){
      
            if($fields['choice_1']) $total += 25;
            if($fields['choice_2']) $total += 50;
            //etcetera
      
            //in your report have a [+formTotal+] placeholder
            $fields['formTotal'] = $total;
            
            return true; //important!
      
         }
      }
      ?>