views:

24

answers:

1

I have a weird issue .I am using simple captcha in forms in my rails applications. If I am using one captcha in a web page I don't have any problem. But I have a scenario of using three(3) forms in one page in which all the three forms will have the captcha . So that when I refresh the page the captcha data of the three forms are equal.

When we come to database , once the page get loaded the captcha value for one particular id will be created, Without using the captcha if we refresh the page the record is getting updated instead of creating another record, And more over if I open the web page in two tabs and if I submit the form in the first page. It throws an exception which says “ Invalid Captcha”

Can anyone please let me know how to handle multiple captcha's in single page. I am using simple_captcha plugin.

Thanks in-advance

A: 

Hi shingara,

I cant see any point using more than one captcha for one page. (I assume that your both forms will submit at the same time.) Because the whole purpose of captcha is to avoid the automatic form submissions.

Second second point is, I'm not sure why you want 3 forms in a single page. You might consider having a one form and filter the identify the parameters accordingly in the controller side.

correct me if I'm mistaken

thanks

sameera

sameera207