Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: BP Custom Message HTML breaks AJAX – why?

@justarandomuser

Participant

OK AJAX is now working. I use now the $GLOBAL variable from WordPress.

Just the new message, whoch is appended my AJAX, is not correctly dispayed. Will continue to find the problem.

It looks like the AJAX response (new message) is appended right after <form …> and before the next <div ….>

<form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
            <div class="conv-textarea">
              <?php //do_action( 'bp_before_message_reply_box' ); ?>
              <textarea name="content" id="message_content" class="auto-height" placeholder=""></textarea>
              <?php //do_action( 'bp_after_message_reply_box' ); ?>
              <div class="conv-bottom">                
                <?php //do_action( 'bp_after_message_reply_box' ); ?>
                <div class="submit">
                  <input type="submit" name="send" value="<?php esc_attr_e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/>
                </div>
                <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
                <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
                <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
              </div>
            </div>
          </form>

Very strange to put a message there.

Skip to toolbar