ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Eliminate captcha after comment preview

September 18, 2007 2:32pm

Subscribe [1]
  • #1 / Sep 18, 2007 2:32pm

    msteinruck

    27 posts

    I’m trying to use captchas for comments. It works fine except that the captcha needs to be entered twice…once to preview and again to submit.

    Here’s my code:

    {exp:comment:form weblog="{my_weblog}" preview="{my_weblog}/index"}
    
    Name: <input type="text" name="name" value="{name}" size="50" />
    
    Email: <input type="text" name="email" value="{email}" size="50" />
    
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    {if logged_out}
    <input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information
    {/if}
    <input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?
    
    {if captcha}
    Please enter the word you see in the image below:
    {captcha}
    <input type="text" name="captcha" value="{captcha_word}" size="20" maxlength="20"  />
    {/if}
    
    {exp:comment:preview}
    <div id="commentPreview">
    {comment}
    Posted on {comment_date format="%F %d, %Y"}
    </div>
    {/exp:comment:preview}
    
    <input type="submit" name="submit" value="Submit" />
    <input type="submit" name="preview" value="Preview" />
    
    {/exp:comment:form}

    Is my placement off, or is there a way to only have the captcha be necessary once?

  • #2 / Oct 28, 2007 3:35pm

    jtnt

    137 posts

    I had this issue as well, but couldn’t think up a solution. I wound up just disabling captcha. It usually annoys people enough when they have to do it once. Having to enter the word twice was is a deal-breaker.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases