Created
February 16, 2017 22:12
-
-
Save klhall1987/2426caf61d8bc763729786725aca6fd1 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Plugin Name: Default Value Example | |
*/ | |
add_filter( 'ninja_forms_render_default_value', 'test', 10, 3 ); | |
function test( $default_value, $field_class, $field_settings ) | |
{ | |
if( 'textbox' == $field_settings[ 'type' ] ) { | |
$default_value = 'test'; | |
} | |
return $default_value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment