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?