Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
in Q2A Core by

Disable Ask the question botton after 1 click?

How i disable Ask the question botton my site users click one click. Because my site users click 3-4 for 1-2 seconds and ask any copy question.


Q2A version: 1.7.1
It was also reproduced in my environment. It should be reported as a core problem.
It is a good idea . Some times the post is submitted twice and create duplicate questions .

1 Answer

+1 vote

The direct solution would be to add to your qa-theme.php:

        function head_custom()

            // default call

                <script type="text/javascript">
                        $(".qa-form-tall-button-ask").click( function() {
                            $(this).prop("disabled", true);

        } // end head_custom


This directly disables the button, afterwards there is NO interaction possible anymore. Why do I say that? Because I have some extra code that stops the submitting and tells the user if there are not enough tags specified, then submitting is prevented. However, with the code above, the user cannot submit the form anymore!