You could try to request the browsers "referrer" parameter. However, this method is extremely unreliable and is often unavailable. The best option would be to have a section (maybe even make it required) where the user selects where they come from.
The reason is what if they found your site on Google at work, then went home and manually typed in the URL? You would count it as a direct visit even though it was really a search engine. That's why most forms typically have a dropdown for this selection.
You could always grab both the referrer as well as their choice and use those for reporting.
Update:
Since you mentioned you are tracking a PPC campaign, I have a few methods that you can use to better track the source.
The first method is to create a landing page for your ad to click over to. Basically, the page will be almost identical to the form on your website, but will instead be a standalone page or subdomain. This page will have a duplicate form that will have the referral value hard coded in. You could have a unique page/site for each campaign source (yoursite/google.aspx, yoursite.com/yahoo.aspx, etc.)
A second method would be to use a single form to take in the submission, but in your campaign assign a querystring variable that will represent the campaign (yourpage.aspx?r=google, yourpage.aspx?r=yahoo, etc.) Once the user loads the page, grab that querystring variable and save it in their session or in a cookie. That way if they browse your site and go back to the form, you would still have their referrer.
As always, these methods don't work if they click to your site from an ad and then manually type it in at home. This isn't super common but it does happen occasionally.