Display the email address of the message sender


Home Forums Front End PM PRO Display the email address of the message sender

This topic is: Not Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44704
    hamed
    Participant

    I want to add a field to the form that will automatically display the email address of the person sending the message.

    Can you help me?

    #44725
    Shamim Hasan
    Keymaster

    Where you want to show sender’s email address?

    #44731
    hamed
    Participant

    On the page where the content of the sent message can be seen.

    #44740
    Shamim Hasan
    Keymaster

    Add following code in your theme’s (child theme’s if you are using) functions.php

    add_action( 'fep_display_after_parent_message', function(){
    	if ( get_current_user_id() != fep_get_message_field( 'mgs_author' ) ) {
    		printf( '<div>Sender Email: %s</div>', fep_get_userdata( fep_get_message_field( 'mgs_author' ), 'user_email', 'id' ) );
    	}
    });
    
Viewing 4 posts - 1 through 4 (of 4 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.