The following example shows how to have a successful submit return to the same page with a success query in the URL. There are other ways to do this, including using AJAX.
In order to view this page live, you'll need to make some adjustments to this template or on your test from:
freeformSuccessSamePage
or adjust the form handle name inside this template to match your test form.