}
}
-
+ 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>
+//
+// <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