BuddyDev

Search

Contact form – Show on profile

Tagged: 

  • Participant
    Level: Initiated
    Posts: 6
    tom0 on #35203

    Hi Ravi
    Thanks for this! The only issue I’ve found is that this seems to break the recaptcha (it’s not visible on the profile page)
    Is this something you can reproduce please?
    Thanks a lot
    Tom

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #35434

    Hello,

    Please update your plugin and append the following code with above mentioned code.

    
    
    /**
     * Load assets on user profile
     *
     * @param bool $is_contact_me_screen Is contact me screen or not.
     *
     * @return bool
     */
    function buddydev_load_bpucf_assets_on_profile( $is_contact_me_screen ) {
    
    	if ( ! bp_is_user_profile() ) {
    		return $is_contact_me_screen;
    	}
    
    	$is_visible = bpucf_is_form_visible( bp_displayed_user_id() );
    
    	if ( ! $is_visible ) {
    		return $is_contact_me_screen;
    	}
    
    	return true;
    }
    add_filter( 'bpucf_is_contact_me_screen', 'buddydev_load_bpucf_assets_on_profile' );
    
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 6
    tom0 on #38774

    Hi Ravi

    Two more queries sorry

    1) Still finding some spam slipping through – what would you recommend please? I have enabled recaptcha

    2) Is there a way I can change the from address for the form to use the users one please? I.e. the email is sent using the person who’s trying to contact the member

    Thanks!

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #38775

    Hi,
    Thank you for the questions. Ravi will be back in the day, so please allow me to answer your questions.

    1. I am sorry but there is nothing we can do it. If you want us to integrate a specific service, please let us know. If the user is bypassing recaptcha, technically, we are not able to stop them unless we use some other kind of spam check.

    2. There is a reason behind not using the sender’s email in from. The mails are sent via your server which is not authorized for sending mails from arbitrary domains. So, if we used the user’s email in from, It will most probably land in the spam and won’t be authentic.

    We instead use the user’s email in the reply-to header, that allows you reply to the user easily without worrying about the sender.

    If you still want to use sender’s email as from, please let us know and Ravi or I will provide a way.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved