WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Captcha Before Submit Button (4 posts)

  1. Nasir Zia
    Member
    Posted 3 years ago #

    Hi,
    I have installed a Captcha plugin, by default the captcha appears below the submit button…
    What is the correct way to bring the captcha above the submit… I have tried to customize the code in comments.php file which is in theme’s folder… by moving do_action(‘comment_form’, $post->ID); above the submit code… But no success..
    It brings the captcha above the comment form…
    Can anyone here please suggest a right method..
    I have pasted the edited code below…

    $out .= '<p>Message: <span class="required">(required)</span></p>';
     $out .= '<textarea name="comment" class="textarea-ctrl" id="comment" rows="5" cols="10"></textarea>';
    $out .= '<div style="height:5px;"></div>';
    do_action('comment_form', $post->ID);
    $out .= '<input name="submit" id="respond-send" type="submit" value="'.$pi_general->getSubmitCommentBtnName().'" />';
    echo $out;
    comment_id_fields();
    $out = '';
    $out .= '<div class="cancel-respond" id="cancel-comment-reply">';
    echo $out; </div>

    Thanks

  2. nixonvs
    Member
    Posted 2 years ago #

    Did you ever figure this out? Same problem.

  3. JarretC
    Member
    Posted 2 years ago #

    Hi nixonvs, have you tried the code the developer provided at http://wordpress.org/support/topic/captcha-showing-below-submit-button-in-comments?replies=4

    Basically, you need to open up your theme's comments.php file and input

    do_action('comment_form_after_fields')

    wherever you would like the captcha to display on your form.

    As a side note, this may also affect other plugins that you are using and move the display of their data as well.

  4. nixonvs
    Member
    Posted 2 years ago #

    Thank you very much for the quick response. No, I didn't try, but I figured it out. I just removed the custom text I had for the submit button. I wanted it to say "Make Request" but that's what seems to do it for most who solved the problem, so I followed suit. I guess it just doesn't like that!

    Much appreciated, Jarret. Love your name; very Bond . . . James Bond (you know, in that movie voice.)

    Ok, I'm just tired, been up all night working on sites. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic