From: Anthony Talarico Date: Tue, 14 Mar 2017 14:16:53 +0000 (-0400) Subject: removing thank you button from confirmation that was left over from france journeys X-Git-Tag: v1.0.0^2~125 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fa143639f361e15ee2663df78ba4a84d215fd516;p=WP-Themes%2Fmackinawferry.git removing thank you button from confirmation that was left over from france journeys --- diff --git a/assets/Fun_Svs.gif b/assets/Fun_Svs.gif new file mode 100644 index 0000000..7de4ecb Binary files /dev/null and b/assets/Fun_Svs.gif differ diff --git a/functions.php b/functions.php index 6738932..d3696f9 100644 --- a/functions.php +++ b/functions.php @@ -153,12 +153,7 @@ function gform_add_product_sku_field( $value ) { } } -// custom form submission confirmation message -function after_submission(){ - echo '
Thanks for contacting us! We will get in touch with you shortly.
'; -} -add_action( 'gform_after_submission_3', 'after_submission', 10, 2 ); // remove pagination from products page diff --git a/lib/gravityforms.php b/lib/gravityforms.php index 349c229..008e94f 100644 --- a/lib/gravityforms.php +++ b/lib/gravityforms.php @@ -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 = "
+//
+// Coupon Code: $activation +// Name: +// School:
+//   +// +//
"; +// +// 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 = "
+//
+// +// Coupon ID

+// 587 N. State Street
St. Ignace, MI 49781
+// 711 S. Huron
Mackinaw City, MI 49701

+// (800)638-9892 +//
+// Free Child Ticket
+// with purchase of
two adult standard fare
Star Line tickets
+//
+//

+// One Coupon per family.
+// Not valid with any other offer.
+//
+// This coupon is exclusively for: +//

+// +// $first $last +// $city, $state +// +//
+// , +//
+//
+//
"; +// +// return $confirmation; +//} \ No newline at end of file