Created
June 23, 2016 16:04
-
-
Save hirejordansmith/e7c42c31d912d11194597b43ebf4cb0e to your computer and use it in GitHub Desktop.
Change field type of a Gravity Form field
This file contains 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 | |
add_filter( 'gform_gf_field_create', 'convert_hidden_to_text', 10, 2 ); | |
function convert_hidden_to_text( $field, $properties ) { | |
if( $field->get_input_type() == 'hidden' ) { | |
$field = new GF_Field_Text( $properties ); | |
} | |
return $field; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment