I'm trying to add a recaptcha to the blogs on our website. Mainly I'm trying to figure out how to set up a reference to the Recaptcha.dll
Can I do this through the umbraco login on a web browser? Someone else set up our Umbraco and I'm new to this trying to figure it out. I was told that our Visual Studio isn't controlling any part of the site which uses Umbraco, so this confuses me as everything I've seen on reCaptcha has you go through visual studio when using Umbraco.
Coincidently, I have just added a reCAPTCHA to one of my client's Umbraco websites a few minutes ago. You shouldn't need to open Visual Studio, but you will need to create a new .NET user-control to use it.
Drop the Recaptcha.dll (and Recaptcha.pdb) into your /bin folder.
On your form, you'll need to incorporate the following into the .NET user-control:
The documentation for the reCAPTCHA API doesn't mention that you need to call "Validate()" explicitly, but I had difficulty getting it to work without it!
For the Public and Private keys, I added those directly to the appSettings in the Web.config:
Thanks for the help, Lee. I have another question if you get around to seeing this again.
I'm getting the recaptcha widget to appear just fine, however I'm having trouble linking it to my submit button for validation.
For posting comments, we have a user control which has the textboxes with some some validation and what not.
I'm having trouble with the btnSubmit method you posted. It doesn't seem to do anything when the validation information from the recaptcha is correct (I tried just changing the text on some labels to verify).
dt>Name: <asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ErrorMessage="This field is required"ControlToValidate="txtName"ValidationGroup="postcomment"></asp:RequiredFieldValidator></dt>
dt>Email: <asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ErrorMessage="This field is required"ControlToValidate="txtEmail"ValidationGroup="postcomment"></asp:RequiredFieldValidator></dt><dd><asp:TextBoxID="txtEmail"runat="server"></asp:TextBox></dd>
dt>Comment: <asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"ErrorMessage="This field is required"ControlToValidate="txtComment"ValidationGroup="postcomment"></asp:RequiredFieldValidator></dt>
And sorry for the terrible formatting on the code up above... I just copy pasted, and it looked fine when I submitted. I tried editting it to make it readable and it came out the same way again.
my blog uses the ajax comment form for its comments... i dont think this will work now? or maybe there is a way to make the comments form use the old form instead of the ajax one?
having google recaptcha dll. file is making problems with dynamic, it doesn't show the images on my site, does anyone have that problem as well ?, and how do i resolve this !?
Recaptcha
I'm trying to add a recaptcha to the blogs on our website. Mainly I'm trying to figure out how to set up a reference to the Recaptcha.dll
Can I do this through the umbraco login on a web browser? Someone else set up our Umbraco and I'm new to this trying to figure it out. I was told that our Visual Studio isn't controlling any part of the site which uses Umbraco, so this confuses me as everything I've seen on reCaptcha has you go through visual studio when using Umbraco.
Hi Josh,
Coincidently, I have just added a reCAPTCHA to one of my client's Umbraco websites a few minutes ago. You shouldn't need to open Visual Studio, but you will need to create a new .NET user-control to use it.
Drop the Recaptcha.dll (and Recaptcha.pdb) into your /bin folder.
On your form, you'll need to incorporate the following into the .NET user-control:
The documentation for the reCAPTCHA API doesn't mention that you need to call "Validate()" explicitly, but I had difficulty getting it to work without it!
For the Public and Private keys, I added those directly to the appSettings in the Web.config:
Best of luck.
Cheers, Lee.
Thanks for the help, Lee. I have another question if you get around to seeing this again.
I'm getting the recaptcha widget to appear just fine, however I'm having trouble linking it to my submit button for validation.
For posting comments, we have a user control which has the textboxes with some some validation and what not.
I'm having trouble with the btnSubmit method you posted. It doesn't seem to do anything when the validation information from the recaptcha is correct (I tried just changing the text on some labels to verify).
AmI missing something silly?
Hi Josh,
Are you using a ValidationGroup on the other controls? If so, check that the submit button has it too.
Other than that, its difficult to say without seeing the code (or a snippet).
Cheers, Lee.
This is the user control that was already implemented. It's basically just 4 text boxes and a submit button (then the recaptcha widget I added).
I'm really just not sure what to do with the 'insert code here' to tell it to actually submit.
Thanks again for your time, Lee.
And sorry for the terrible formatting on the code up above... I just copy pasted, and it looked fine when I submitted. I tried editting it to make it readable and it came out the same way again.
Thanks for all of your help Lee! I finally figured it out. I just needed to call btnSubmit_Click(sender,e) when the recaptcha was valid.
my blog uses the ajax comment form for its comments... i dont think this will work now? or maybe there is a way to make the comments form use the old form instead of the ajax one?
having google recaptcha dll. file is making problems with dynamic, it doesn't show the images on my site, does anyone have that problem as well ?, and how do i resolve this !?
is working on a reply...