Author of the post in hidden field
-
Hi,
i’using this code in a hidden field to take the email of the post author in which my form is compiled. It seems that miss a little thing but i don’t understand what Is anyone can help me?
Thanks a lotfunction my_filter_function( $data, $field_id ){ // $data will contain all of the field settings that have been saved for this field. // Let's change the default value of the field if it has an ID of 3 if( $field_id == 15 ){ global $post; $data['default_value'] = the_author_meta('user_email'); } return $data; } add_filter( 'ninja_forms_field', 'my_filter_function', 10, 2 );
- The topic ‘Author of the post in hidden field’ is closed to new replies.