Good Day!
When our site visitors and clients click on the "Post Comment" or "Reply" buttons, the buttons do not provide any clear feedback indicating if their submittal is being processed.
The only feedback provided is the AJAX spinner shown at the top of the site page which many times is difficult to spot or does not clearly indicate what is happening after clicking the buttons.
In short, it would be EXTREMELY BENEFICIAL if you can update your plugin's code to ensure your "Post Comment" and "Reply" buttons provide feedback after they're clicked. Preferably, by adding the word "Processing..." or "Sending..." inside the buttons after they're clicked.
Until a decision has been made, can you provide a code snippet (i.e., filter and/or hook) that would allow us to perform the above?
For a demo on how that would work, please visit our site's Contact page and click the "Submit" button of the page form (Note: There's no need to fill out the form).
Thank you!
Hi,
We’re unable to locate the wpDiscuz comment form to investigate the issue. Please provide a direct URL so we can check it.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Hi @asti,
Check this post. There is no button feedback (compared to the example I provided above) when visitors click the "Post Comment" or "Reply" buttons. After clicking the buttons, page hangs for 10-30 seconds before anything appears on the comments section.
As previously suggested, these buttons need to offer better feedback 🙂
Thank you!
We don't see any issues, please watch this video:
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Hi @asti,
Yes, that is what we see at our end too. However, that is NOT the issue or request.
On slower networks, PCs, etc., after clicking the Post Comment and Reply buttons, nothing happens on the screen for several seconds. We're looking for button FEEDBACK (i.e., a spinner next to button when it's clicked or changing the button text from say "Post Comment" to "Processing..." or "Sending...").
Thank you!
Hi @asti,
One more comment 🙂 The above is not a bug rather an enhancement request. Apologies for any confusion.
If you could integrate feedback into the buttons, that would be a big plus. For a specific example on how that would work, please visit this page and click the "Submit" button (no need to fill out the form). Once you click the button, "Submit" will change to "Processing..." - and stay that way until the form is fully processed.
Meanwhile, our team will explore your plugin's code and see if we can help at our end. If we come up with a solution, I'll defiinitely share it with you.
Cheers!
We will provide a new hook in the next version, allowing you to make the customizations you need.
I'll update this topic once it's ready.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Awesome! Thank you so much, @asti. Many will benefit from the hook(s).
If you don't mind, a couple of friendly reminders:
1. Please make sure the hook(s) will apply to the "Post Comment" buttons (main and reply areas) and also to the "View Comments" button.
2. Once the hook(s) are defined, it would great if you can also provide the filter for those buttons.
Cheers!
The new hook has been added. Please update the wpDiscuz plugin and write your custom code based on it. An example is provided below.
$(document).on('wpdiscuz_new_comment', function(e, btn, form, depth){
// do your stuff
});
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
You are awesome. Thanks for that!
Using your information, I tried several codes snippets to change our button text from "Post Comment" to "Posting...". Unfortunately, none of them worked.
What am I doing wrong?
Thank you!
(Note: Not posting the code snippets used to prevent confusion)
Helpful:
The attached code snippet works great with WordPress' native comment system. Please give it a spin.
Perhaps you can adapt it for your plugin?
Thank you!
Use this code:
$(document).on('wpdiscuz_new_comment', function(e, btn, form, depth){
$(btn).val("Posting...");
})
$(document).on('wpdiscuz_comment_posted', function(e, btn, form, commentId, commentsCount){
$(btn).val('Post Comment');
});
This code works if you're using wpDiscuz 7.6.29 or a higher version.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Regrettably, your code does not work at my end. Tested with wpDiscuz 7.6.29, all plugins deactivated except essentials, and flushed all cache.
These are the test code snippets I used:
PHP Code Snippet: https://prnt.sc/sR0Sp3BGvxl_
JS Code Snippet: https://prnt.sc/l0YwnRKbuN-Y
Does it work at your end? How did you exactly implement it?
Thank you!
Please try adding the JS code within jQuery(document).ready(function(){}); and also try adding it directly to the theme files.
We've checked the code multiple times and it's working fine.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Hi @Asti,
Perfect! Worked like a charm.
Below please find the updated code snippet.
To see the code snippet in action, please visit this post and click on "Post Comment."
I cannot thank you enough for your help, dedication, and second-to-none plugin.
To help others, perhaps you can add this to your plugin's documentation?
Have a great week.
Cheers!
---------------------------
function wpdiscuz_button_feedack_onclick() {
if ( is_singular( 'post' ) ) {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(document).on('wpdiscuz_new_comment', function(e, btn, form, depth){
$(btn).val("Posting...");
})
$(document).on('wpdiscuz_comment_posted', function(e, btn, form, commentId, commentsCount){
$(btn).val('Post Comment');
});
});
</script>
<?php
}
}
add_action('wp_footer', 'wpdiscuz_button_feedack_onclick');


