Skip to:
Content
Pages
Categories
Search
Top
Bottom

autosuggestions for @mentions – not working with Gravity Forms


  • katparker12
    Participant

    @katparker12

    WordPress version 5.6
    BuddyPress version 7.0.0
    Gravity Forms version 2.4.21 with Advanced Post Creation add-on
    Avada Theme
    http://www.mgroupcorp.com

    This site is using gravity forms to feed into an intranet posting feature, and they want to be able to tag other users. When I create a backend post, the dropdown list of mentions populates. When I try from the frontend (as most users would) there is no dropdown. If you know the entire username, the tag still works – it’s just the dropdown that won’t appear. Activity streams are turned on, and I have the following code in my functions.php

    add_filter( ‘bp_activity_maybe_load_mentions_scripts’, ‘buddydev_enable_mention_autosuggestions’, 10, 2 );

    function buddydev_enable_mention_autosuggestions( $load, $mentions_enabled ) {

    if( ! $mentions_enabled ) {
    return $load;//activity mention is not enabled, so no need to bother
    }
    //modify this condition to suit yours
    if( is_user_logged_in() && bp_is_current_component( ‘gravity_forms’ ) ) {
    $load = true;
    }

    return $load;
    }

    Am I missing something else? Thanks!

  • You must be logged in to reply to this topic.
Skip to toolbar