This content has been marked as final. Show 2 replies
ADDT forms are actually designed to have the form action be set to the same page as the form itself. In other words, when you submit an ADDT created form, it always submits to itself, not to the redirect page.
This is not an unusual way to handle forms, and is done this way for several reasons. One is because this is one of the best ways to do server side and client side error checking. It makes it easier to keep the submitted data in the form when there is an error with the form.
The redirect is only handled after a sucessful Insert transaction. I suspect all the redirect does is set the header to go to the redirect page if the Insert transaction is successful.
I have had a similar problem where the form would submit and return to the form page. However, the data was not inserted into the database in my case. Someone had modified the code accidentaly, and unfortunately I never tracked the problem down because I just reuploaded a back up of that page to fix the problem.
Check to make sure your redirect is correctly set with the correct path to an existing file. I think this may happen if you don't have it correctly pointing to an existing page.
Hope this helps,
Shane, thanks for your very precise and very informative answer. I did not know that about the get URI function. I always thought it grabbed the redirect and dumped it into the form action.
But I'm still baffled by what's happening in my case. As I say, the form data DOES get inserted into the DB but the page does not redirect. The redirect page is just a simple thanks.php file sitting the the same directory as the form. It's possible I misspelled it, I guess. I'll check that, but it's unlikely.
But in any case, you've enlightened my about what's going on behind the scenes so it's something to go on and do some more troubleshooting.
Thanks very much for your help!