Hello Matthew,
I appreciate your difficulty! When I first started with Freeway I ad just the same problems and misunderstanding. Rest assured the fog clears eventually!
Anyway, how to help you… (and I’m using Freeway 3.5.6 not Express or anything, so i can’t see your interface, things might be a little different.)
The normal way a form works is that it sends the information a visitor enters to a ‘form processing script’. A script is a mini programme, not made or manufactured by Freeway, and often written in a language like Perl or PHP. The form processing script is usually placed in your web space together with your Freeway generated html files. The form processing script ‘processes’ the information it receives and generates an email which it sends to you automatically through the web server’s email function. Don’t try and understand all this at the moment, just accept that it is so! But basically your page needs to send the information to a ‘script’ which will then digest the information and send it on to you in an email.
OK?
Go to this address and download the Form-2-Mail script. http://www.wholehogsoftware.com/index.php/page/free_php_scripts
Unzip it and you will see 6 files. The one you need is form-2-mail.php (ignore the rest)
Open the file in a text editor (NOT a word processor, don’t use Word) and around about line 11 you will see some code like this:
$domains = Array (
'1' => 'yourdomain.co.uk',
'2' => '',
Replace 'yourdomain.co.uk with the name of your domain, www not needed. Note the single quotation marks at either end, you must put your domain name between these.
Scroll down to around line 43 and you’ll see a similar section of code, but this time you want to put your email address between the quotation marks. The script lets you send the visitors’ information to upto 20 addresses, but I suspect you’ll only want enquiries to come to you at the moment. Enter your email address between the quote marks for 1 and leave the rest as it is.
Done. Save the changes.
OK, now go to your Freeway form page. Go to Page>Form SetUp and when the dialogue box comes up you should see the first tab called FORM. Choose POST as the method, and in the ACTION field type form-2-mail.php
Now go to the Hidden Fields tab. Click NEW and for the Name type sendto and for the Action type 1
Click NEW again and add a second hidden field, name subject value Web Site Enquiry
You should add two further hidden fields, one called ‘successpage’ and one called ‘errorpage’, their values being the filename of the thankyou and error pages which people should be sent to after they’ve submitted the form. You create these pages in Freeway and they should have file names like ‘thankyou.html’ and ‘error.html’ these are the values you enter in the hidden fields for successpage and errorpage.
You can optionally add a 5th hidden field named ‘required’, with the values being the names of the fields which must be filled in for the form to accept the visitors entry. You should have named your fields in Freeway, maybe calling them Name, Email, Address etc. Well, just put these exact same names in the value part of the hidden field dialogue, separated by a comma.
The form might work with only the two hidden fields ‘sendto’ and ‘subject’. But it’s good practise to create thankyou and error pages.
Close the form setup dialogue and save the Freeway doc. Publish your Freeway files.
Finally, upload all your Freeway files to your web server. But also upload the form-2-mail.php file and place it amongst the html files (don’t put it in the Resources folder!!)
All being well, when you test your form it should work and send you an email!
This routine will NOT work locally on your Mac. The form processing script will only work on a live web server.
Sound complicated, daunting? It is the first time round. But it becomes second nature eventually.
There are also hundreds of different form processing scripts…and hundreds of gallery scripts, content management scripts, guestbook scripts…etc. etc!! I’m just recommending one which I have used with some success and which is fairly easy to set up.
If you have a problem, let me know. And apologies in advance if your Freeway interface is different - I don’t have Express.
good luck!
Hugh
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options