Guest User

Untitled

a guest
Feb 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. add_filter( 'gform_field_content', function ( $field_content, $field ) {
  2. if ( $field->type == 'creditcard' ) {
  3. $field_content = str_replace( ".1' id", ".1' autocomplete='cc-number' id", $field_content );
  4. $field_content = str_replace( "_2_month'", "_2_month' autocomplete='cc-exp-month'", $field_content );
  5. $field_content = str_replace( "_2_year'", "_2_year' autocomplete='cc-exp-year'", $field_content );
  6. $field_content = str_replace( ".3' id", ".3' autocomplete='cc-csc' id", $field_content );
  7. $field_content = str_replace( ".5' id", ".5' autocomplete='cc-name' id", $field_content );
  8. }
  9.  
  10. return $field_content;
  11. }, 10, 2 );
Add Comment
Please, Sign In to add comment