Skip to content

Instantly share code, notes, and snippets.

@klhall1987
Created January 25, 2017 18:50
Show Gist options
  • Save klhall1987/8ab24b89d352bbd73fe1a020d40e0d3a to your computer and use it in GitHub Desktop.
Save klhall1987/8ab24b89d352bbd73fe1a020d40e0d3a to your computer and use it in GitHub Desktop.
add_filter( 'ninja_forms_render_default_value', 'my_change_nf_default_value', 10, 3 );
function my_change_nf_default_value( $default_value, $field_type, $field_settings ) {
if( 'your_field_key' == $field_settings[ 'key' ] ){
$default_value = 'foo';
}
return $default_value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment