How do I add a text field under the activity texarea?

I am working with BuddyPress 1.7. I need to add a text field under under the activity/update text area and capture that data when an update is posted. Any help to help to get me started would be much appreciated.

I see the post-form.php file that contains the HTML form elements but how can my text box be added using a plugin through a filter?

Related posts

2 comments

  1. I was able to add text field under the activity text area using the bp_after_activity_post_form hook.

    add_action ( "bp_after_activity_post_form", 'test' );
    
    
    
    function test()
    {
        echo '<div id="tags-content"> 
                <input type="text" name="tags" value="" />
            </div>';
    }
    
  2. Use the

    do_action( 'bp_activity_post_form_options' ) 
    

    hook in post-form.php to insert your text field.

    Capture may be more difficult, but the field should be available via $_POST.
    Try using the 'bp_activity_before_save' or 'bp_activity_after_save' hooks used in buddypressbp-activity ...php

Comments are closed.