Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation is not triggered on 2nd submit with missing fields #28

Closed
timbertens opened this issue Nov 30, 2015 · 4 comments
Closed

Validation is not triggered on 2nd submit with missing fields #28

timbertens opened this issue Nov 30, 2015 · 4 comments

Comments

@timbertens
Copy link

I have a weird issue with your otherwise excellent plugin.
I'm using a custom form (as specified in the documentation) that has certain fields that are required. Upon the first submit with missing data for required fields the form returns to be shown and the errors are shown as well. But on the second attempt, without filling in the required fields the form gets submitted and show the specified redirect page.

@timbertens
Copy link
Author

Just some additional info that might help. I thought I had something to do with the redirect tag

<input type="hidden" name="redirect" value="{{siteUrl}}contact/bedankt">

I've just tested the form without any redirection tags, so the normal redirect (current page + querystring 'submitted=0' should apply)

It appears that only in random cases the querystring is added to the url and when that happens sometime the error objects is not present and no error messages are shown.

Hope this helps

@hubertprein
Copy link
Contributor

@timbertens I've been testing around a bit, and it's because of the Anti Spam that's been build in. When you submit the form to quick (within 3 seconds by default, see settings for changing this), the plugin notices this as a spam submission, and fools the user into redirecting to the redirect page.

If you test your situation again, but wait a few seconds on the 2nd attempt, you should notice that it works fine. Could you test this, and let me know if that works normally?

In the meantime, I've got to figure out a solution for not marking a submission as spam, when you have multiple attempts of submitting one submission.

@hubertprein
Copy link
Contributor

@timbertens Should be fixed with the latest release. Let me know if this solves your issue :)

@timbertens
Copy link
Author

Thanks! When I wait for 3 seconds it works fine! I did not catch the antispam functionality, good to know!
(I have another issue since craft 2.5 with uploading files, but I'll post it in a new Issue for sake of clarity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants