How do I get a form to submit to a text/htm file?

liunx

Guest
Hi guys, great forum by the way!<br />
<br />
I'm having a bit of a problem, and I'm really hoping one of you experts can help me out! :) I'm trying to web-enable a survey to gather research for my MBA project, only I'm not too great when it comes to HTML.<br />
<br />
I created a questionnaire in Excel and just published it directly to FrontPage. Right now there are no form tags at all (I tried a few, but nothing was working, so I removed them). What I would really like is to have the "Submit" button dump all the data into an online text/htm file and bring up a confirmation screen basically saying "Thanks for your participation."<br />
<br />
I've tried using the form wizard, but I would prefer not to because the survey is quite long and already formatted, and it seems like a lot more work to re-do the whole thing.<br />
<br />
Anyway, I've got the file posted at <!-- m --><a class="postlink" href="http://www.geocities.com/th_mba5">http://www.geocities.com/th_mba5</a><!-- m --> just in case looking at it gives you a better idea of what I'm trying to do. Any help would be greatly appreciated! Thanks in advance. :)<!--content-->You could try BFormMail (see <!-- m --><a class="postlink" href="http://www.infosheet.com/iScripts.html">http://www.infosheet.com/iScripts.html</a><!-- m --> for details) That will let you submit the data to a flatfile database text file. However, you will need to have your page/survey hosted by a webhost that let's you use cgi scripts (something Geocities doesn't - at least as far as I remember they don't).<br />
<br />
Hope this helps.<br />
<br />
Neil<!--content-->Thanks Neil! I'll give that a try.<br />
<br />
I don't think it can be done on geocities - but I'm not planning to leave it there anyway. :D Will probably stick it on my school server, which I'm sure supports cgi. <br />
<br />
So say I do find a script and post it to a site that supports cgi - then what? How do I write the form tag? How do I make the cgi save the results?<br />
<br />
Well, thanks so much for the response, and I'll check out Infosheet.<br />
<br />
Just out of curiousity, when I generate a form with FrontPage's wizard, it generates HTML that looks like this:<br />
<br />
<form method="POST" action="--WEBBOT-SELF--"><br />
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"<br />
S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><br />
<p><input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p><br />
</form><br />
<br />
Any ideas how that one works? That seems like a pretty simple way to save results to a text file, but I don't exactly know how to set it up.<!--content-->so by looking at the questionare I see you have everything but the from tags, this part is easy.<br />
<br />
all you need is<br />
<br />
<form action="somescript.cgi" method="post"><br />
<br />
put that at the very top right under the body tag.<br />
<br />
then right before the ending body tag add this one </form><br />
<br />
then you are done. :)<br />
<br />
now the next part is to get a script to do what you want. every item in your form as a name like this<br />
<br />
<input type="radio" value="1" name="leadership_entry"><br />
<br />
the cgi script will need to get that name and parse the value. if you go with the one Neil suggested then it shouldn't be that hard.<br />
<br />
the name of the script will go in the action of the form in the forms start tag.<br />
<br />
does this make since? and don't use frontpages form wizard as it generates uneccasary code.<!--content-->Thanks so much you guys!! <br />
<br />
I've Download <!--more-->ed the script Neil suggested and I'm playing with the tutorial now.<br />
<br />
That form code looks easy enough, thanks Scoutt!<br />
<br />
I'll let you know how it turns out... :)<!--content-->
 
Back
Top