Buy Now
Sign in

Form resubmits every refresh and message stays on form

momentis , May 10 2021, 12:55
momentis 474
May 10 2021, 12:55 #396404
I have hit a roadblock with CFv7 and I cannot understand what's going on. I am attempting to create a simple contact form using the Advanced Form editor so I can finally learn this version.
Upon submission of the form, I have a Save Data action and a Message action in the Actions area of the start_page. There is an end_page, but I have nothing in that. In the form Settings, I have a Validate Fields behavior and an Admin Email behavior.
When testing the form and submitting info, I am seeing the following:
1) The Message displays at the top of the form, and the data submitted still shows in the fields.
2) The data is saved to the appropriate table in the database.
3) No Admin email is sent.
4) Refreshing the page, or browsing away and coming back, automatically resubmits the data still showing in the fields to the database. The submission Message still shows as well. Even with a blank form the Message shows and a blank row is inserted into the DB table.
I tried moving the Message action to the end_page, but then I receive a "Destination directory not available." error. I moved the Message back to start_page and deleted the end_page, which solved nothing.
I am so completely lost and frustrated with this version and could use some help. For the moderators, I am including the site info and login credentials:
The content here is visible only for authorized users.
momentis 474
May 12 2021, 14:18 #396433
Anyone out there that can help with this? Super frustrating!!!
admin 33
May 12 2021, 16:08 #396438
how does this work when you test the form in the admin area ? if it does work fine then something on your frontend is causing it, most propably cache!
momentis 474
May 12 2021, 16:23 #396439
Does the same thing in Admin area as on front-end. I have also tried it on a brand new install in a subdomain, no caching whatsoever enabled, and I am seeing the same result.
momentis 474
May 12 2021, 16:26 #396440
Also set the template to protostar and it didn't help. Shows up in different browsers (FF, Edge), which have never accessed the page, when browsing to the new form.
momentis 474
May 12 2021, 19:56 #396448
I tried clearing browser cache completely as well as using another browser. The Message still comes up every time the form is loaded AND resubmits a blank row to the database. I would post a link to the form but the forum will not allow it.
cruser 121
May 18 2021, 14:28 #396509
I have this very same issue.
momentis 474
May 18 2021, 14:34 #396510
It took me a bit of banging around to realize that the Save Data and Message actions need to be in the Actions area on a different page than the form. I had (wrongly) assumed that a second "page" in the setup area would create a separate page on the live form. It was s HUGE departure from v5, which is what I've always used.
So, for a basic form, you will have all your fields and submit button on the "start_page" and the Save Data and Message actions on the "end_page".
I hope this helps!!

admin 33
May 18 2021, 15:22 #396516
Actually this is the same s in v5, the form submits to the next page and that's where the submit actions should be!