Forms and Scripts... HELP!

Hi

This is all very new to me, I have been creating a site with FW4 Express these past few weeks and have taught myself everything so far except have hit a major hurdle at the end of the site creation.

Can someone please explain in very VERY simple terms what I need to do get information that has been input into my site sent to me in an email? The information is very basic, Name, Contact, Country etc and the form has been set up.

Where do I go from here? I have read the reference guide about 100 times and cant get my head around ‘scripts’. What are they? What is their relationship to forms? Why do we need them? Also, how do I set one up with my host & will I need an understanding of html to do so? I have looked into it and my host supports most but options of Perl, ASP and PHP but to be honest I don’t even know what that means!

All I want is the information that has been entered into my site to be sent back to me in the form of an email so I can follow up.

The “Action” section in the “Form Setup” option under “Pages” is throwing me. What needs to be entered here - html or some sort of address?

Although my lack of knowledge is a little embarrassing I appreciate forums for helping out the beginners,

Cheers


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

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

Hugh, your assistance is highly appreciated - thank you very much.

After an entire day reading into scripts I have learned that my package with my ISP supports ASP scripting (its a microsoft host) and the example you provided is a PHP language.

Is there any chance you could recommend an asp form processing script? Is the process for creating the script the same as above? I seem to become stuck with entering the correct address into the “action” field of the “form setup” box - am I getting ahead of myself by setting up a cgi directory on my web files?

Every time I request help form my ISP they continuously send me to the following page

http://faq.1and1.com/scripting_languages_supported/asp_active_server_pages/4.html

Which is starting to make some sense the more I look at it but I am not sure whether I need to make any changes to the code?

thanks again - a daunted user


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi,

I’m not sure I can help with ASP - never had ASP enabled web space and never used an ASP script. But I’ll try.

I think (emphasis on ‘think’ !) that ASP is mainly used on Microsoft servers, whereas most of the web (90%+) uses UNIX servers. To be honest, in the long run anyway, I’d recommend moving to a UNIX host base which will probably give you PHP, Perl and even maybe ASP support.

However…that doesn’t help you at the moment. Let’s see…

OK, go to that address you gave me. Select and copy the first lot of red text, from its <% @LANGUAGE=“VBSCRIPT”…start to its

Thank You!!

end. Paste this into a text document (NOT a Word document, you MUST use a plain text editor NOT a word processor) and save the file with the name [b]forminfo.asp[/b]

OK, within the same script you have to change a few things.

Mail.FromName = “1&1 Test” - change 1&1 Test to your name or company or whatever.

Mail.FromAddress= Request.Form(“email”) - leave this as it is but make sure the field for the email address in your form has the name email, all lower case - must be exactly the same!

Mail.RemoteHost = “mrelay.perfora.net - I suspect you can leave this as it is, I assume it is the ISP’s outgoing mail server. If it isn’t you’ll need to find out from your ISP what to put here.

Mail.AddRecipient “ABCDE Company”, “email@hidden” - just as with the PHP script, change these values to your own company and your own email address! Remember to keep it inside the quote marks just as they do. One small coding glitch is fatal to a script!

Mail.BodyText = Request.Form(“info”) - again, leave this as it is but make sure the larger enquiry field in your form has the name info all lower case etc. Or change it here to whatever you already named the file. The point is they must be exactly the same.

OK, save your changes and close the file.

Now to your Freeway doc:

In the Page>Form Setup dialogue, select the method POST and enter your script file name in the ACTION field, i.e. forminfo.asp

It doesn’t look as though any hidden fields are supported, so that’s it! Save your Freeway doc and publish. As per previous instructions, upload your Freeway pages and the forminfo.asp file to your webspace.

It should work! But don’t blame me if it doesn’t, as I say I’ve never used ASP (for instance, I have no idea if ASP scripts have a special sub-folder or whether they just live amongst your html files…you’ll soon find out!)

Have a go anyway and let me know how you get on.

Consider for the long term finding some UNIX hosting with PHP and Perl support - more user friendly! I use exclusively web space from www.clook.co.uk - they are simply the best ISP I have ever used with, in my opinion, unmatched server specs and unmatched support. Seeing as this is the web, it really makes very little difference where your server or ISP is located. I host 90% of my clients with clook, apart from the odd one or two who ballsed it up and went and got their own space at BT or somewhere idiotic…! However, am sure there are lots of UNIX ISPs to choose from in Oz.

Good luck!

Hugh


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Having used both ASP and PHP for the past 10 years, let me recommend
to you: RUN, don’t walk, to a host (1&1 offers this, so you don’t
have to run far and get all out of breath) that provides PHP. ASP can
be made secure, but it’s a really full-time job. Unless you need to
have Access or some other proprietary Microsoft technology running on
your server, there really is no good reason to use ASP.

Now that the sermon is over, here’s a very usable ASP form handler:
http://www.serverobjects.com/products.htm#aspmail and here’s a free
one: http://www.brainjar.com/asp/formmail/

Hope this helps,

Walter

On Feb 25, 2008, at 11:46 PM, Matthew wrote:

Hugh, your assistance is highly appreciated - thank you very much.

After an entire day reading into scripts I have learned that my
package with my ISP supports ASP scripting (its a microsoft host)
and the example you provided is a PHP language.

Is there any chance you could recommend an asp form processing
script? Is the process for creating the script the same as above? I
seem to become stuck with entering the correct address into the
“action” field of the “form setup” box - am I getting ahead of
myself by setting up a cgi directory on my web files?

Every time I request help form my ISP they continuously send me to
the following page

http://faq.1and1.com/scripting_languages_supported/
asp_active_server_pages/4.html

Which is starting to make some sense the more I look at it but I am
not sure whether I need to make any changes to the code?

thanks again - a daunted user


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Matthew,

Our linux hosting runs PHP and works with for example the Freeway easiform actions scripts provided by Mike @ http://www.easibase.com/easiForm/index.php

Test drive a control panel here:
http://www.printlineadvertising.co.uk/freeway

On 26 Feb 2008, at 13:39, Walter Lee Davis wrote:

Having used both ASP and PHP for the past 10 years, let me recommend

to you: RUN, don’t walk, to a host

David Owen
Freeway Friendly Web hosting and Domains ::

http://www.printlineadvertising.co.uk/freeway
http://www.ineedwebhosting.co.uk

Walter,

Interesting comment - I currently working on a site for a client that need a database for job opportunities 500+ Jobs to start with. Which Mike Brackenbridge will be work on for the database work.

The client currently hosts the site on a Microsoft server which has PHP. (Just can’t get them away from the support plan and hosting the PC chaps have given them)

I’m suggesting to just have the jobs section and MySql database run on our Linux hosting under a domain like jobs.domain.co.uk. So its like a sub domain of the main domain. Leaving the bulk of the basic site on the Microsoft server. As we run the hosting this would mean we have all the tools and full access to the jobs part of the site and database in a familiar environment.

I would be interested in your advice (especially your experience dealing with Microsoft Servers), if that sounds like good advice for the client.

regards

David

On 26 Feb 2008, at 13:39, Walter Lee Davis wrote:

ASP can be made secure, but it’s a really full-time job. Unless you need to
have Access or some other proprietary Microsoft technology running on
your server, there really is no good reason to use ASP.

David Owen
Freeway Friendly Web hosting and Domains ::

http://www.printlineadvertising.co.uk/freeway
http://www.ineedwebhosting.co.uk

errr…David…might that be best in a Dynamo thread? A bit beyond the OP’s Express reach, I think…:wink:

rgds
Hugh


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes it should be… posted it to the wrong thread. :-

On 26 Feb 2008, at 15:21, hugh wrote:

errr…David…might that be best in a Dynamo thread? A bit beyond the OP’s Express reach, I think…:wink:

rgds
Hugh

David Owen
Freeway Friendly Web hosting and Domains ::

http://www.printlineadvertising.co.uk/freeway
http://www.ineedwebhosting.co.uk

I’ll start a new thread on Dynamo with my comments.

Walter

On Feb 26, 2008, at 10:25 AM, David Owen wrote:

Yes it should be… posted it to the wrong thread. :-

On 26 Feb 2008, at 15:21, hugh wrote:

errr…David…might that be best in a Dynamo thread? A bit
beyond the OP’s Express reach, I think…:wink:

rgds
Hugh

David Owen
Freeway Friendly Web hosting and Domains ::
http://www.printlineadvertising.co.uk/freeway
http://www.ineedwebhosting.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Matthew, did you get it working?

Hugh


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Hugh,

at this point I have arranged for my ISP to switch me from microsoft to linux hosting so I can use PHP and Pearl as advised above. I set up a mailto for the time being which is working but no the greatest.

I appreciate all your help with the steps above, it gives me the confidence to learn something new all the time.

Thanks again


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you ever find time to look into scripts in any more depth, you’ll find a whole bunch of them (thousands!) at http://www.hotscripts.com

Just follow the link to the PHP section and you’ll see the categories, including Form Processors which is what we’re dealing with here.

Hugh


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If your looking for Form processing with Freeway Pro 4 or above then
check out the PHP easiForm Actions, you can add them as per the
tutorial below and then test your form before buying them, if it does
what you want then you just purchase a license and upload it to the
form directory to remove the alerts and allow the thanks page to load.

http://www.easibase.com/freeway/freeway_form.php

You will need PHP to be available on your server account.

On Mar 3, 2008, at 11:11 AM, hugh wrote:

If you ever find time to look into scripts in any more depth, you’ll
find a whole bunch of them (thousands!) at http://www.hotscripts.com

Just follow the link to the PHP section and you’ll see the
categories, including Form Processors which is what we’re dealing
with here.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello all,

I have read the explanation about php forms from Hugh. Thank you for that!
And i followed his steps, but i can’t seem to find out how it works. Have i done something wrong?
On “contact” is my form on http://www.betaalbarekozijnen.nl

Don’t look at the design or menu etc. it is under construction and it doesn’t look how it supposed to be. Just playing around.

Marianne


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Marianne

I’m sorry I dont see your contact form here

http://www.betaalbarekozijnen.nl/

Is there more?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options