Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • franxifra
    Participant

    @franxifra

    The code is working fine, the meta activity is created, but the only problem is that meta_value is empty, I’ve checked that the input name and $_POST value but still nothing!

    This is my code on bp-custom.php

    function add_meta_to_activity( $content, $user_id, $activity_id ) {
    
        bp_activity_update_meta( $activity_id, 'option1', $_POST['option1'] );
    
    }
    add_action( 'bp_activity_posted_update', 'add_meta_to_activity', 10, 3 );
    

    and this code on post-form.php inside the form tag

    <li>option <input name="option1" id="option1" type="text" /></li>

    any ideas why is not taking the $_POST value?

    Thank you one more time for your help!


    franxifra
    Participant

    @franxifra

    Thank you for your quick answer, I’ve to add that code to bp-custom.php right?

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar