Glitch in jQuery code for bbPress reply form customization.

I've had some jQuery code made up to customize the way bbPress' reply form works, which generally includes moving the reply form beneath whatever reply the user chooses to reply to (without a refresh). This all works great when there are already existing replies on the page but I only just realized it creates a weird glitch when there isn't. On a topic with no replies, clicking "reply" on the topic removes the reply form from the page and the only way to get it back is to refresh the page entirely.

I've granted support access for the site and included the jQuery code in a support access message.

Thanks in advance!

  • Bojan Radonic
    • Head of Support

    Hey there Alayna,

    Hope you're doing well today :slight_smile:

    As much as we'd like to help with all problems our members have this is out of scope of support that we can provide here since this is a custom solution for a third party plugin.

    With that said I've checked the code and from what I can see form is inserted after element with class "bbp-pagination" which does't exist on a forum page that doesn't have any replies on it, this explains why the code is not working so you'd need to target different element where form would be added in order for it to work on all forum pages.

    Hope this helps :slight_smile:

    Cheers,
    Bojan

  • Alayna
    • Site Builder, Child of Zeus

    Sorry about that, I'll take that into consideration next time but thank you so much, I've solved the problem! Hooked it into the footer of the page instead of the pagination and works like a charm. :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.