Skip to content

Instantly share code, notes, and snippets.

<?php
// apply_filters('ninja_forms_render_default_value', $default_value, $field_type, $feild_settings);
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( 'textbox' == $field_type ){
$default_value = 'foo';
}
return $default_value;