How to get Ninja Forms filters to work in Wordpress PHP? Beginner

Multi tool use
How to get Ninja Forms filters to work in Wordpress PHP? Beginner
I am trying to send mail to the address held in the variable ($authemail). The code is in a child-theme template (author.php). The documentation has bits of code but does a poor job of explaining how to implement them.
It should be possible with "Dynamic Field Settings" and "Localized Fields."
Will someone help me understand how to use these bits of code please?
// This variable contains the correct email...
echo $authemail;
// This bit displays the form correctly...
echo do_shortcode('[ninja_form id=5]');
// Can't figure out how to make any of these do anything...
$default_value = "default value 141";
$field_type = "text";
$field_settings = "123";
apply_filters('ninja_forms_render_default_value', $default_value, $field_type, $field_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;
}
add_filter( 'ninja_forms_render_default_value', 'wm_the_value' , 10 , 3);
function wm_the_value( $default_value, $field_type, $field_settings ) {
if( 'textbox' == $field_type && in_array('nf-field-26' , $field_settings)){
$default_value = "HELLOOO158";
}
return $default_value;
}
function nf_hidden_field_values( $value, $field_type, $field_settings ) {
global $post;
if ( $field_settings['key'] == 'test_15296381754001' ) {
return get_field('acf_field_1', $post->ID);
}
return $value;
}
add_filter( 'ninja_forms_render_default_value', 'nf_hidden_field_values', 10, 3 );
$field = apply_filters( 'ninja_forms_localize_fields', $field );
if ( !empty( $field ) ) {
echo "HELLOOO189";
}
function filter_ninja_forms_localize_fields( $field ) {
if( is_array($field['settings']) && array_key_exists("label", $field['settings']) ){
$field['settings']['label'] = esc_html__( $field['settings']['label'], "keyboardpro197");
}
return $field;
}
add_filter( 'ninja_forms_localize_fields', 'filter_ninja_forms_localize_fields', 10, 1 );
function translate_ninja_forms_fields( $field ) {
$field['settings']['label'] = "test";
$field['settings']['select_files_text'] = "test";
return $field;
}
add_filter( 'ninja_forms_localize_fields', 'ninja_forms_localize_fields', 10, 1 );
add_action( 'ninja_forms_email_admin', 'ninja_forms_change_from_address' );
function ninja_forms_change_from_address(){
global $ninja_forms_processing;
if( 5 == $ninja_forms_processing->get_form_ID() ) {
$user_email = $ninja_forms_processing->get_field_value( 2 );
$user_name = $ninja_forms_processing->get_field_value( 5 );
$user_email = $user_name." <".$user_email."> 226 ";
$ninja_forms_processing->update_form_setting( 'test_1529638175400', $user_email );
}
}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.