« February 2010 »
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28

You are not logged in. Log in
Open Community
Post to this Blog

Helpful Links
Angelfire Home
Register Your Domain
Angelfire's Twitter
Angelfire's Facebook

Angelfire Club Blog
Need assistance and ideas from fellow Angelfire members to help build and manage your website? You've come to the right place!
To join this Community Blog, you must be an Angelfire member. Just click the "Join this Community" link, and start posting immediately.

Hint: When posting, select a topic that most relates to your question. (News, FrontPage, HTML Questions, etc...) This will help to keep the blog organized for everyone.

View Latest Entries

Tuesday, 16 February 2010
Contact Us page trouble- reposted as public entry

langley- you posted this as a "shared with community" post which rather confusingly means a private post that is only seen when members are in a logged in state. I reposted for you publicly so you and others have a better chance of seeing this. I'll post my answer as a comment.

Contact Us page trouble
Topic: HTML Questions

Hi!!

I am having some trouble getting my Form to send me a response.

THe FAQ says to save the file to insert <INPUT TYPE="hidden" NAME="savefile" VALUE="visitors.txt">

I don't know what this "visitors.txt" is :(

I tried to create a similar subfolder, but the page will not save the information from http://langleychiefs.angelfire.com/page2.html. The Thank you page shows fine as soon as "Submit" is hit, but no info is saved.

I would really appreciate any help!

Thanks! 


Posted by CW at 10:34 AM EST | Post Comment | View Comments (4) | Permalink | Share This Post

Tuesday, 16 February 2010 - 10:42 AM EST

Name: "cw"

If these are the instructions you're following as per the AF help site, then I'm going to take issue with them

<FORM ACTION="/cgi-bin/script_library/form_handler_mail" METHOD="POST">
What is your name? <INPUT TYPE="text" NAME="visitor_name">
What is your email address? <INPUT TYPE="text" NAME="email">
<INPUT TYPE="hidden" NAME="end_display" VALUE="http://www.YOURLINK.com">
<INPUT TYPE="hidden" NAME="required" VALUE="email">
<INPUT TYPE="hidden" NAME="order" VALUE="visitor_name, email">
<INPUT TYPE="hidden" NAME="savefile" VALUE="visitors.txt">
<INPUT TYPE="hidden" NAME="email_to" VALUE="username@somewhere.com">
<INPUT TYPE="submit" VALUE="Submit">
</FORM>

 

If you want to save them to a file (visitors.txt) then this line needs to be changed if I recall correctly. The following sends the info as email and does not save to a file

<FORM ACTION="/cgi-bin/script_library/form_handler_mail" METHOD="POST">

so if you want to save to a file then I believe it should be

<FORM ACTION="/cgi-bin/script_library/form_handler_file" METHOD="POST"> 

visitor.txt will be created for you automatically and can (should be) found in your webshell for retrieval. although it may be created as page2.html.txt or some variation of the page file name your form appears on. It's been a while since i tested this for myself at AF so I'm going from memory.

hope that helps!

 

 

Tuesday, 16 February 2010 - 4:56 PM EST

Name: "cw"

I tested out your form hml and to write to a file you have to make the change I mentioned earlier. There is also an additional change that must be made to have the returned fields written to a file or sent to your emailYou need to complete the "order" input field. In your form it should look like this

In your form code I also see an error here, actually incomplete excess code that should be removed

this:

<INPUT TYPE="hidden" NAME="order" <INPUT TYPE="hidden" NAME="order"

VALUE="visitor_name, email">
should be this:
<INPUT TYPE="hidden" NAME="order" VALUE="Award #1, Award #2, Award #3, Award #4 Award #5"> 

again, hope that helps. The visitors.txt file is automatically generated and updated with each new submission. Refresh your webshell if you don't see it listed after you test your revised form code the first time.

Wednesday, 17 February 2010 - 6:19 PM EST

Name: langleychiefs
Home Page: http://langleychiefs.angelfire.com

thank you so much! what a relief!

Friday, 30 April 2010 - 5:12 PM EDT

Name: "cew"

Hi!  I am having a similar problem.

 

As far as I know you need to have a mail template

(I think the extension for the template is .txt -- this is one of my questions though)

See

https://www.angelfire.lycos.com/build/cgi/index3.tmpl

 

Here is a sample template for the mail:

Mail Template
To: $form_mailto
From: cewcathar@hotmail.com
Subject: Visitor Feedback
 
$form_name, $form_email, $form_comments
 
(I saved my template in my cgi-bin and named my template
contact_mail.txt  You then have to indicate the url of the mail template
with the expression $mail_template="./";
where the url is specified in between the slash and the closing quotation mark;
however I am not sure I have properly grabbed my variables from my form;
I used a program to read in my data to a buffer and then convert it to a
hash array -- it has to be a hash array so you can access the variables by name)
require AngelfireMail;

$MAIL = new AngelfireMail;

$mail_template = "./contact_mail.txt";

%variables = ('form_mailto' => $mail_to,

              'form_name'  => $name,

              'form_email'   =>  $email,

              'form_comments' => $comments);

$MAIL->sendMail($mail_template, \%variables);
 
(Below is my read into buffer code; it may also have an error!
I got it at
http://www.yourhtmlsource.com/cgi/)


if ($ENV{'REQUEST_METHOD'} eq 'POST') {

# Reads in buffer

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

# Splits up the buffer into an array

# consisting of names

# and values for each name 

@pairs = split(/&/, $buffer);
# defines the variables

# that it will write 

foreach $pair (@pairs) { 

($name, $value) = split(/=/, $pair); 

$value =~ tr/+/ /; 

$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; 

$FORM{$name} = $value;

}
Hope someone can figure out what file is needed.
Best,
cew

View Latest Entries