I’m glad it worked.
The key to understanding it is that any snippet that processes a form will execute when the page is first loaded, then execute again when "Submit" is clicked to process the form. Obviously, it needs to behave differently in each case. The first time, it just displays the form. The second time it processes it.
All the variables in the form are set in the $_POST array, but only when the form is actually submitted.
The trick is accomplished by putting a hidden variable in the form that will only be set when it is submitted. The test in the FormIt snippet that I posted above performs the test. It returns an empty string if the $_POST variable is not set and the &submitVar property in the snippet tag *is* set.
The first time through, the property is set, but the $_POST variable isn’t, so it returns an empty string (no output from the snippet). The form is on the page itself, so it displays. The second time through, the property is set and so is the $_POST variable so the snippet code executes and sends the email.
When the property is not set, FormIt will try to process the form and send an email when the page is posted. The test should probably check the value of the $_POST variable against the parameter.