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
How can I implement Live search suggestions using already posted questions in my Q2A site ?
Q2A version: 1.6.3
Good question. Hopefully someone can help us with this feature. It would be great if there is a plugin or added to the next version.

1 Answer

+2 votes
selected by
Best answer

I once implemented that. Just put the askbox on the startpage:

                // teaser to ask, askbar, only show for visitors that are not logged in
                if( !qa_is_logged_in() ) {
                    $askQuestionString = 'What do you like to know?';
<div class="ask-teaser-input">
    <div class="ask-teaser-inner">
        <p>Ask anonymously: </p>
        <form method="post" action="<?php echo qa_path_html('ask', null); ?>">
            <input onkeyup="qa_title_change2(this.value);" autocomplete="off" id="askboxin" name="title" type="text" placeholder="<?php echo $askQuestionString; ?>">
            <span id="similar"></span>
            <style type="text/css">
                #similar {
                    margin:20px 0 20px 233px !important;
<script type="text/javascript">
    var similarQuShow2 = false; // eetv variable
    var minWords2 = 2; // eetv min words before showing similar questions
    function qa_title_change2(value) {
        // eetv added if: only show similar question if more than 2 words and chars>15
        var totalWords = value.split(/[\s\.\?]+/).length;
        if(totalWords>=minWords2 && value.length>=15) {
            // increase
            minWords2 = totalWords;
            // show #similar
            document.getElementById('similar').style.display = "block";
            qa_ajax_post('asktitle', {title:value}, function(lines) {
                if (lines[0]=='1') {
                    if (lines[1].length) {
                    if (lines.length>2) {
                        var simelem=document.getElementById('similar');
                        if (simelem)
                } else if (lines[0]=='0')
            qa_show_waiting_after(document.getElementById('similar'), true);
            $('#similar').css('display', 'block');
            $('#similar').css('margin', '20px');
        else if(similarQuShow2) {
            // eetv: we were showing similar questions already, user deleted some chars/words
            // reinit
        else if(value.length==0) {
            // eetv: hide similar questions if title got removed again by user
            minWords2 = 2;
            document.getElementById('similar').style.display = "none";

        <input class="ask-boxT-button" type="submit" value="Ask without registration">
        <input type="hidden" name="doask1" VALUE="1">


If you like I could make a plugin of that. But for the work I'd charge 9 USD per plugin download.