Mar 4, 2012 at 4:14 PM
Edited Mar 4, 2012 at 4:40 PM
The closest thing I can find to contact forms or comments with captcha are both relying on RoutParts.
CyberStride appears to be missing captcha
oForms seems to have it but I havn't played with it but it also relies on RoutPart.
I've toyed with the source on but of the above and should have luck but it doesn't solve the issue of Captcha for comments.
Dndz.Industries looks like exactly what I need but it isn't showing up even after adding it to the comments part yet the validation *is* showing up because I can't submit a comment.
Any tips on the best way to get this done?
Update, after converting this post from Russian to English I was able to see I should be adding the Captcha to the BlogPost, not the comments. After doing so it shows up. Unfortunately my next issue is that it never accepts my captcha input.
Debugging shows that the
DefaultCaptchaService.cs is trying to pull the results from the Request params but none of the three fields it wants are available:
var contentTypeFieldValue = curHttpContext.Request.Params[contentTypeFieldName];
The three fields it wants is based on this:
internal const string CAPTCHA_DEFAULT_TEXTBOX_NAME = "captchaattempt";
internal const string CAPTCHA_DEFAULT_GUID_FIELD_NAME = "captchaguid";
internal const string CAPTCHA_DEFAULT_CONTENTITEM_FIELD_NAME = "captchacontentitem";
In the HTML, all are certainly there:
<div class="postinput shape-tracing-selected" shape-id="9">
<img src="/Dndz.Industries/CaptchaImage/Render?challengeGuid=ecc23fb4-aee3-4db0-bbe3-c18ac5c0ae77&contentType=BlogPost" shape-id="9" class="shape-tracing-selected">
<input id="captchaguid" name="captchaguid" type="hidden" value="ecc23fb4-aee3-4db0-bbe3-c18ac5c0ae77" shape-id="9" class="shape-tracing-selected">
<p shape-id="9" class="shape-tracing-selected">
<input class="comment shape-tracing-selected" id="captchaattempt" name="captchaattempt" size="22" type="text" value="" shape-id="9">
<small shape-id="9" class="shape-tracing-selected">Verification letters</small>