Advertisement
chrishajer

Copy credit card to a hidden field

Jan 1st, 2013
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2. // http://www.gravityhelp.com/forums/topic/credit-card-field-function-can-i-collect-see-and-save-info-with-ssl-cert#post-111843
  3. // Change 24 here to your form ID
  4. add_action('gform_pre_submission_filter_24', 'save_credit_card');
  5. function save_credit_card($form) {
  6.     // field 10 is where the user will enter their credit card
  7.     // change the 10 here to your actual field ID
  8.     $credit_card_no = $_POST['input_10'];
  9.    
  10.     // hidden field ID 12 is where we will store the credit card information
  11.     // change the 12 to the actual ID of the field where you want to store credit card
  12.     $_POST['input_12'] = $credit_card_no;
  13.     return $form;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement