Home › Forums › Front End PM PRO › Ajax replies? › Reply To: Ajax replies?
July 23, 2020 at 5:50 pm
#39563
little.chimp
Participant
This is what I’m using at the moment, but I don’t feel it’s ideal.
add_filter( 'fep_form_submit_button', function( $button, $where ){
if( 'reply' == $where ){
$button = '<button type="submit" onclick="setTimeout(\'history.go(0);\',500);" class="fep-button" name="fep_action" value="'. esc_attr( $where ) .'">Reply</button>';
}
return $button;
}, 10, 2 );
This would be better if using Ajax to pull in the newest messages on the page, but I’m not sure how to implement it at this point.
setTimeout("location.href = \'https://www.website.com/messages/?fepaction=viewmessage&fep_id=7#fep-messge-17\';",500);