Forked from spivurno/gw-gravity-forms-set-input-as-tel.php
Created
October 23, 2023 15:33
-
-
Save esedic/558c12d8d38bf8f6f8d9da6cd50ffef1 to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Set Input Type as Tel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Set Input Type as Tel | |
* http://gravitywiz.com/ | |
*/ | |
add_filter( 'gform_field_content_723_10', 'gw_set_tel_input_type' ); | |
function gw_set_tel_input_type( $input ) { | |
$input = preg_replace( "/type='[\\w]+'/", "type='tel'", $input ); | |
return $input; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment