Skip to content

Instantly share code, notes, and snippets.

@klhall1987
Created February 16, 2017 22:12
Show Gist options
  • Save klhall1987/2426caf61d8bc763729786725aca6fd1 to your computer and use it in GitHub Desktop.
Save klhall1987/2426caf61d8bc763729786725aca6fd1 to your computer and use it in GitHub Desktop.
<?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