Form submission "thank you" page

They have: 10 posts

Joined: Jan 2002

Hi,

Let's say I have a form where someone fills in their data. Then in the ThankYou page, how do I show the results of what they typed? EX: They entered their name before so on this page it would say: Your Name: John Smith... this is so viewers can print out these results. It's like online shopping where users have to to confirm their orders prior to finalizing it. Please note: I'm not using any CGI, ASP... I'm using the formmailer feature from SPhosting.com, but I do know html, css, dhtml, some javascript. SPhosting's thankyou page has the user's entered entries except their html source doesn't say how it's done.

I'll need a response really really soon...

Thank you, Thank you, Thank you,
DVfreak

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

You want to know how it's done? Or you want to learn how to do it?

A form field has two parts -- a name and a value. It's generally referred to as a name/value pair. When the form is submitted, all these name/value pairs are available to whichever language is being used.

SPhosting.com likely uses CGI or PHP to submit the form, you can tell by looking at the action field of the form. .cgi or .pl are Perl/CGI, .php, .phtml, .php3 et cetera are PHP.

The scripting is done on the server, so it won't show in the HTML source.

Please further define what information you need.

Smiling Suzanne

They have: 10 posts

Joined: Jan 2002

Okay I decided to change to Bravenet's Form service because I can control the address url for the thankyou page which sphosting can't do. Lets say, for example, someone fills in this info in a form (using Bravenet's cgi code):

Name: [ ]
Email: [ ]
[submit]

On the thank you page, I would like to customize it as so the viewer would see what they entered. This would appear as normal as text:

Name: John Smith
Email: [email protected]

Now the viewer can print this information, copy it to WordPad, etc, to keep on hold. I guess this sums up what I'm looking for. ... But if you know a service/site that explains all this or can do this for me, please tell me where to find it.

Thanks so far...
DVFreak

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

That would be something you would have to program into the form handler script itself. Basically, your program/script would take the name/value pairs and return them...

$name = $value;
$email = (I forget the syntax, but you get the value from the form);

print VITALS>>

Name: $name
Email: $email

VITALS;

I probably have the syntax wrong since it's off the top of my head and I haven't programmed in Perl in about two years now, but that's the idea. If you want to built it yourself, or hack the scripts available to you to add in that feature, you can post in the Scripting forum for more help.

They have: 10 posts

Joined: Jan 2002

Heh, no I wouldn't go that far into hacking the script -- not in my field. I remember once seeing in the html source of a a thankyou page some coding making the viewer's data be shown after he submitted a form. It was something like this ": " and the result was this:

Name: John Smith

.... (I recall seeing 'value' in one of the tags) but this was long ago, so I don't remember how its done or where to find it....

Bahhh... thanks anyway! However, if anyone knows how to accomplish this in html without Perl,cgi,etc, please tell me how!

DVfreak

Busy's picture

He has: 6,151 posts

Joined: May 2001

You cant do this with HTML.
You could do it with Javascript but youd have to use some server side scripting.
Find a similar page to what you want, see what the action field is as Suzanna suggested and look at the input fields, if the have something like name="" (before anything is submitted) then they are using something like ASP,CGI,PHP etc.

the value is the form fields value, what is displayed, like a default, its the name value thats the value.

They have: 10 posts

Joined: Jan 2002

Found this!!!!!!!!!!!!!!!!!!!
http://www.webcom.com/help/form_proc/confirm.shtml

This is exactly what I want to create... notcice the source code on the confirmation page. I noticed it uses again a cgi script. Arghhhhh. Busy if you know where I can find out how to do it in Javascript plz tell me cause I'm looking for one with javascript now.

DVfreak

Busy's picture

He has: 6,151 posts

Joined: May 2001

that example is server side, notice the page name .shtml

server side Javascript is totally different to client side Javascript you'll need certain permissions to perform certain tasks.

can you not use asp, php, cgi etc? would be a lot easier

They have: 10 posts

Joined: Jan 2002

Ok well, which one would be the easiet to use considering I never used them before. Would I have to experiment in a web server to make sure a script works (constant uploading over every update - just great) or something? Would I be able to experiment the forms on my PC to make sure it works correctly? If I were to add an field in my html form would a script have to be updated also? Too many questions, so little time.... . . .... I guess my main question is which is the easiest & quickest to learn Laughing out loud. Thx.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

re: adding input field -- It depends on the script.

http://www.scriptarchive.com/readme/formmail.html

This is the most common script. It's CGI. Install it, read the readme and set the variables you need to set, do not use a custom thank you page. It will return all the fields you use as data submitted to you through the form.

As far as experimenting to make sure it works, make things a little easier on yourself and check with your host and see if a) they already have it installed, b) allow you to install your own cgi scripts.

No, you won't be able to experiment on your PC unless you have Perl installed and have a virtual website set up. Under some circumstances, you can do this, but if you don't know about server-side scripting at all, I'd say that installing the various languages might be a bit beyond your current skill level.

Good luck!

They have: 10 posts

Joined: Jan 2002

Ok thanks... I'll get started on this cgi script. I'll post at these forums in case I need furthur help with this script.

Thank you everyone for helping, you've been a great source for help.

:roll:

Thanks!!
DV Freak

Busy's picture

He has: 6,151 posts

Joined: May 2001

if you want to run it off your pc (you'll have to learn it still) you can download a server bundle like firepages.com.au main package is apache/php and mysql but other options include perl as well as the perl documentation

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

What is best to use to make changes to a cgi-script? I have a couple of scripts to install for a site I've just taken over and I've been told that notepad changes things to the script when you save and then it wont work???

Julia - if life was meant to be easy Michael Angelo would have painted the floor....

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

http://www.editpadpro.com/ is a good text editor (and the right price!) -- what you're looking for mostly is an editor that doesn't add spurious hidden code (Notepad does). There are also issues with some text editors on a Mac adding non-Unix line endings, but that is being resolved.

Homesite, CSE HTMLValidator, BBEdit, NoteTab all do fine jobs.

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

Ta very much Laughing out loud

They have: 5,633 posts

Joined: Jan 1970

Looks like autoresponders and automatic redirects after submissions are needed here. Check out logiforms.com. They are an ASP and they can help you build forms, autoresponders, notifications, send out emails etc etc. It's pretty cool. Will probably help alot of NON-Coders get teh job done in terms of creating databse driven forms and all that good stuff. There is a free trial at their site. logiforms.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.