Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link To Member Profile In Form Field


  • littlemisslanna
    Participant

    @littlemisslanna

    So right now I am using Gravity Forms with the Sticky List plugin to create an editable database people can submit information to. I have a hidden field that automatically populates the username of the submitter, which is cool and what I want. But I would like that username in question to link to that user’s BuddyPress profile.

    I have a feeling it has to do with some PHP code, but I’m not savvy with php as I’d like to be. This is what I have so far, from a previous topic I found on the forum.

    
    add_filter( 'gform_field_value_linkuser', 'link_username' );
    
    <?php
    add_filter( 'gform_field_value_linkuser', 'link_username' );
    function link_username($user_login) {
       return '$_COOKIE['utm_campaign']; < NO idea what to return here! 
    }
    ?>
    

    I assume the return value should be something like <a href="URL.com/members/[USERNAME]">Username </a>, but I don’t know how to make that work in PHP!

    Please help me out! BBP Version is 2.5.9, WP version is most recent one, Gravity Forms 1.9.19, Gravity Forms Sticky List plugin 1.4.1.

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar