You need to sign in to do that
Don't have an account?
Sriram M
Adding a Custom captcha to Visual Force page
Hi all,
I have a requirement for adding a Captcha mechanism to a form.
I don't want to use the Google reCaptcha. So I did some searching and found the below link.
http://www.tehnrd.com/simple-visualforce-captcha/
I was able to add the captcha as given in the above link and make it functional.
Now the problem starts when I try to add the logic for refreshing the captcha (for loading a different captcha pattern).
I tried adding a commandlink. It is refreshing the entire page along with the captcha. I wanted to have an AJAX like functionality which refreshes the particular captcha section alone.
The APEX code which generates the captcha resides in my controller class file which is responsible for controlling the entire form.
How can I make the refresh without affecting the rest of the form functionality? I have to invoke the specific method which generates the captcha, get the updated captcha value and render it in the captcha section.
Please help me out with your suggestions and solutions.
Thanks in advance.
I have a requirement for adding a Captcha mechanism to a form.
I don't want to use the Google reCaptcha. So I did some searching and found the below link.
http://www.tehnrd.com/simple-visualforce-captcha/
I was able to add the captcha as given in the above link and make it functional.
Now the problem starts when I try to add the logic for refreshing the captcha (for loading a different captcha pattern).
I tried adding a commandlink. It is refreshing the entire page along with the captcha. I wanted to have an AJAX like functionality which refreshes the particular captcha section alone.
The APEX code which generates the captcha resides in my controller class file which is responsible for controlling the entire form.
How can I make the refresh without affecting the rest of the form functionality? I have to invoke the specific method which generates the captcha, get the updated captcha value and render it in the captcha section.
Please help me out with your suggestions and solutions.
Thanks in advance.
Here is a link of Salesforce document where they clearly mentioned how to implement Captcha on VF pages
https://developer.salesforce.com/page/Adding_CAPTCHA_to_Force.com_Sites
The link which you provided suggests on how to use the Google reCaptcha.
But I didn't wanted to use the Google reCaptcha.
I wanted to have a captcha which is completely based on Apex (or Salesforce).
Thanks
It was a simple attribute. "reRender".
I have added the reRender attribute for re-rendering the form on clicking the commandLink and it worked.
Re-render renders the content of an element without reloading the page. And fortunately it keeps the typed information intact in the form.
Thanks