removing thank you button from confirmation that was left over from france journeys
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 14 Mar 2017 14:16:53 +0000 (10:16 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 14 Mar 2017 14:16:53 +0000 (10:16 -0400)
assets/Fun_Svs.gif [new file with mode: 0644]
functions.php
lib/gravityforms.php

diff --git a/assets/Fun_Svs.gif b/assets/Fun_Svs.gif
new file mode 100644 (file)
index 0000000..7de4ecb
Binary files /dev/null and b/assets/Fun_Svs.gif differ
index 6738932..d3696f9 100644 (file)
@@ -153,12 +153,7 @@ function gform_add_product_sku_field( $value ) {
     }
 }
 
-// custom form submission confirmation message
-function after_submission(){
-    echo '<div class="form-confirmation"><div class="confirmation-text"> Thanks for contacting us! We will get in touch with you shortly.</div></div>';
-}
 
-add_action( 'gform_after_submission_3', 'after_submission', 10, 2 );
 
 
 // remove pagination from products page
index 349c229..008e94f 100644 (file)
@@ -23,9 +23,102 @@ function validate_code( $validation_result ) {
         }
 
     }
-
+    function get_field(){
+        $data = array('code' => strtoupper( rgpost( 'input_5' ) ), 'first' => rgpost( 'input_1.3' ), 'last' =>  rgpost( 'input_1.6' ), 'school' => rgpost( 'input_4' ) );
+        return $data;
+    }
     //Assign modified $form object back to the validation result
     $validation_result['form'] = $form;
     return $validation_result;
 
-}
\ No newline at end of file
+}
+
+//add_filter( 'gform_confirmation_4', 'fun_coupon_message', 10, 4 );
+//
+//function fun_coupon_message( $confirmation, $form, $entry, $ajax ) {
+//    $image = esc_url( get_template_directory_uri() );
+//   
+//    $code           = get_field();
+//    $first          = $code['first'];
+//    $last           = $code['last'];
+//    $school         = $code['school'];
+//    $activation     = $code['code'];
+//            
+//    $confirmation = "<div id='fun_svs_coupon-offer'>
+//                        <div style='width: 240px; float: left; position: relative; text-align: left;'><img style='display: block; margin: 0 auto;' src='$image/assets/Fun_Svs.gif' />
+//                        <strong style='display: block; float: right;'>Coupon Code: $activation <!-- accessCode -->
+//                            Name: <!-- fname --> <!-- lname -->
+//                            School:<!-- school --></strong></div>
+//                            &nbsp;
+//                            <ul>
+//                                <li>Coupons are valid only for students at schools hosting a Fun Services Santa's Secret Shop<sup>®</sup> or Holiday Gift Shop<sup>®</sup> programs. Maximum age is 12 years.</li>
+//                                <li>Coupons are not transferable.</li>
+//                                <li id='nostyle'>Redeem this coupon for up to two FREE child tickets with the purchase of one adult full fare ticket. (child must be present when redeeming coupon)
+//                                <p class='small'>Parental Signature: ____________________________________</p>
+//                                Expires 10-27-2016</li>
+//                            </ul>
+//                    </div>";
+//
+//    return $confirmation;
+//}
+
+
+
+//
+//add_filter( 'gform_validation_3', 'validate_code_3' );
+//
+//function validate_code_3( $validation_result ) {
+//    $form = $validation_result['form'];
+//
+//    function get_field(){
+//        $datas = array( 'first' => rgpost( 'input_1.3' ), 'last' =>  rgpost( 'input_1.6' ), 'school' => rgpost( 'input_4' ) , 'state' => rgpost( 'input_3.5' ), 'city' => rgpost( 'input_3.3' ) );
+//        echo rgpost( 'input_3.5' );
+//        return $datas;
+//    }
+//    //Assign modified $form object back to the validation result
+//    $validation_result['form'] = $form;
+//    return $validation_result;
+//
+//}
+//
+//add_filter( 'gform_confirmation_3', 'coupon_message', 10, 4 );
+//
+//function coupon_message( $confirmation, $form, $entry, $ajax ) {
+//    $image = esc_url( get_template_directory_uri() );
+//   
+//    $code           = get_field();
+//    $first          = $code['first'];
+//    $last           = $code['last'];
+//    $city           = $code['city'];
+//    $state          = $code['state'];
+//    
+//            
+//    $confirmation = "<div id='coupon-offer'>
+//                        <div style='width: 200px; float: left; position: relative; text-align: center;'>
+//                            <img src='<!-- url -->templates/logo.gif' style='display: block; margin: 0 auto;'>
+//                            <strong>Coupon ID <!-- num --></strong><br><br>
+//                            587 N. State Street<br>St. Ignace, MI 49781<br>
+//                            711 S. Huron<br>Mackinaw City, MI 49701<br><br>
+//                            (800)638-9892
+//                            </div>
+//                        <strong style='font-size: 22px;'>Free Child Ticket</strong><br>
+//                        with purchase of<br> two adult standard fare<br> Star Line tickets<br>
+//                      <br>
+//                      <p class='small'>
+//                            One Coupon per family.<br>
+//                        Not valid with any other offer.<br>
+//                        <br>
+//                        This coupon is exclusively for:
+//                        </p>
+//                      <strong> 
+//                      $first $last
+//                      $city, $state
+//                        <!-- fname -->
+//                        <!-- lname --><br>
+//                          <!-- city -->, <!-- state -->
+//                        </strong>
+//                        <div class='clearer' style='clear:both;'></div>
+//                    </div>";
+//
+//    return $confirmation;
+//}
\ No newline at end of file