Link: M Go Blue: Form Display Question.
Depending on where we put the code, it will either display the "thank you" page and not enter data into the database, or it will enter data into the database and not display the "thank you" page. But, it never does both at the same time. Any advice?
It sounds like you are on the right track: you are getting things to work, just not how you want them to. In the form element of the form you create there is an XSQL page named in the action attribute. You need to associate an XSLT page with that XSQL page that displays thank-you when the insert has succeeded.