-
- 225 Posts
I will give more details when I have a chance, but I am hoping someone might have a quick fix.
I have a login form on a site, no registration, no forgot password, etc. This will just be used by the client. Only in Firefox, and not every time, when I hit submit it redirects me to the "thank you" page I have set for a formit email form. I then receive an email in the email account I use for testing formit, with all blank fields.
The formit email form won’t even send without filling out all the fields. This is very odd, but I have a feeling it is something minor. Any help is much appreciated.
-
- 24,544 Posts
Check the "action" of the form on the Login page. Also check the ID of the redirect parameter in the Login snippet tag (can’t remember what it’s called).
-
- 225 Posts
I know the ID is correct, but let me check the "action". That sounds like something I would overlook. Thanks Bob.
-
- 225 Posts
Ok, I have an update. The login form is in a side bar column, to the right of every page. This behavior only happens when I am on the page that contains the formit contact form. So when this behavior is occurring, I have one instance of formit and one instance of login on the same page.
Nothing I try helps. I still get an email sent when I login while on the contact page.
-
- 24,544 Posts
Look at the page source and make sure that the two sets of <form> </form> tags don’t overlap and that each has its own submit button within the tags.
-
- 24,544 Posts
It’s not the action you want to change. Both snippets want to repost to the current page in order to complete their work. You could have them forward the user somewhere else and put a second copy of the snippet there, but I don’t think you have to.
Look at the hidden form field value that each snippet uses to detect a repost -- make sure they are different.
Also, add a name attribute to each form:
<form name = "login" action=">
</form>
In theory, that should separate their actions and submitting from one form shouldn’t affect the other form.
-
- 24,544 Posts
Those things aren’t used to test for a repost, so you should put them back the way they were.
FormIt checks for a repost with this code:
if (!empty($submitVar) && empty($_POST[$submitVar])) return '';
If you don’t send a &submitVar parameter in the snippet tag, it will fall through and execute its hooks (e.g., email) when the Login repost occurs (and the submitVar is not there). Note that to make FormIt work, then, you need to make sure you have a matching hidden submitVar in the FormIt form.