PDA

View Full Version : Form Cgi


Wazcal
11-06-2003, 10:29 AM
How do I set up a forms cgi for the action= part of my forms here at the Zone. Can I somehow use the redirect feature we have ?

I checked out the Link to Matt's via the Draac tute on forms and wasn't able to get the code when I clicked on the download button.

Or should I just use mailto for all my forms including the drop down menus.

Take care, Art.

Star-Shadow
11-06-2003, 12:20 PM
For Art --

I'm not sure what you're asking, regarding that first part. Here's a link to my own CGI-powered form page. Perhaps an examination will help.

this is my home-site form page (http://www.website-wonder.com/superscript/FormMail/sendmessage.html)

This particular form isn't PC-friendly in its present condition, but only because of the way I'm coloring the text field and text area elements. Can be modified easily enough. Fine for me.

Additionally, it should be noted that the useage of {mailto} is NOT a reliable means of mailing forms. Sometimes it'll work, and sometimes it won't. That's the bottom line. Take a gander here:

problems with form mailto method (http://webdesign.about.com/cs/forms/a/aamailtobroke.htm)

GEST
11-06-2003, 12:21 PM
Originally posted by Wazcal@Nov 6 2003, 11:29 AM
How do I set up a forms cgi for the action= part of my forms here at the Zone. Can I somehow use the redirect feature we have ?

I checked out the Link to Matt's via the Draac tute on forms and wasn't able to get the code when I clicked on the download button.

Or should I just use mailto for all my forms including the drop down menus.

Take care, Art.
Last I heard, Art, you have to have Larry set up a CGI Mailto. Here is the exact code, less the correct user name and domain name, that is on my feedback page. This is just a form skeleton. The results can be the center of a super page to suit your theme(s). :thumbsup:



<form method="post"
action="http://www.wtv-zone.com/user/cgi-bin/mailme.cgi">
<strong><input name="Redirect" type="hidden"
value="http://www.user.com/thanks.html" /> <input name="SendTo"
type="hidden" value="WebBunny@user.com" /> <input
name="Subject" type="hidden" value="User Feedback" /></strong>
<p><strong><textarea name="comment" rows="3"
cols="50"></textarea></strong></p>
<p>Your Name:<br />
<input name="Name" type="text" /></p>
<p>Your Email Address:<br />
<input name="Email" type="text" /><br />
<font size="-2">(For Response, Proper Address Must Be
Entered)</font></p>
<p><input type="submit" value="Send Comment" /></p>
</form>



By the way, this is XHTML 1.0 Transitional coding. :rotfl:

Star-Shadow
11-06-2003, 12:38 PM
For Art, Again --

Oh. Maybe now I know. Are you merely seeking to use a CGI form-mailing method? If so, The Zone already has one. Just click that ‘form mail’ auto-install button at the bottom of each file manager page.

A folder will be created in whatever directory you're in upon clicking the thing. That new folder will contain several pages, including the perl script (CGI) for mailing your forms.

Matt's pages work okay ... but they're extremely boring in appearance. So feel free to re-write everything from scratch, but for the perl script itself (which you couldn't access, even if desired).

Was that what you were asking?

Wazcal
11-06-2003, 01:14 PM
Yeah, part of it Danny.

I should have been more descript. One of my biggest weaknesses in basic HTML is the form. Although they function, mine, in their current state, would never pass validation. Mostly because I don't have an action ...

<form action="something.cgi">

or

<form action="mailto:whatever@whereever.adot">

I have nothing where I'm wanting input from a viewer, but it's my understanding that all forms, including drop down menus, should have an action value. Either a cgi or mailto.

I'm just trying to figure out (understand) what I need to do, and how to do it, to accomplish that.

Cool GEST,

Spec 1 seems easy enough. Allot of it is simply common sense, proper coding that we should always do anyway. Plus the lower case, proper document type, character set, closing all tags, putting the / in all normally open tags, having all values in quotation, the suggested xml notation, proper html tag, etc.

I'll be doing my home page soon. Without Tidy (which I do like allot). I just want to see if I can apply it myself, then check it. Any suggestions on a good HTML validator ? Dr Watson doesn't seem to recognize the XHTML thing.

What blew my mind is Spec 2. I could read several Clavell novels faster. lol

Have you checked out XML ? Whoa !

I'm glad it's not yet compatible with Webtv, whew !

Thanks and take care, Art.

Star-Shadow
11-06-2003, 01:39 PM
For Art --

Ohhhhhh ... so ya wanna know what to do about the ‘action’ attribute, eh? Now I understand. Here's all I can tell ya.

Yes, the tute sites all seem to say that the ‘action’ attribute is a required element of all forms. Well, I can't argue against their claim. But what I will say is this ...

The auto drop-downs currently used all throughout my place were acquired at The JavaScript Source. Since that time, I've looked at any number of other drop-down scripts, as I'm always open to new ideas. Yet oddly enough, none that I've thus far seen has ever had an ‘action’ attribute. I even posted on this subject once, back in the old forum, but got no replies. Sooooo ...

In spite of what the tute sites say ...

In spite of how much validators complain ...

The fact remains that these scripts were all written by folks who know a whole lot more about such things than does little old me. I have therefore concluded that this ‘missing action’ attribute is a prime example of the well-known adage -- every rule has an exception.

Till someone ‘in the know’ can prove otherwise, I shall not modify these perfectly operating scripts just to satisfy some crazy-@$$ validator. Be gone from my head, o ye foolish thought.

GEST
11-06-2003, 04:06 PM
I use the WDG Validator now that W3C has become so MSN/WebTV-unfriendly. :thmsdown:

You can find an auto-loading portal to it at the GEST Workshop (http://www.wtv-zone.com/phyrst/workshop/). :thumbsup:

Wazcal
11-06-2003, 09:50 PM
I've noticed the same thing Danny.

I suppose I should "Not worry and be happy". ;)

Just thought I'd check to make sure.

Thanks.

I use the WDG Validator now that W3C has become so MSN/WebTV-unfriendly.


GEST,

That has more to do with the Webtv compatibility issues, lack of them actually. The W3C isn't doing anything wrong. I just used the validator yesterday on the PC at the Library. Worked just fine.

Later, Art.

GEST
11-07-2003, 02:50 PM
Originally posted by Wazcal@Nov 6 2003, 10:50 PM
I've noticed the same thing Danny.

I suppose I should "Not worry and be happy". ;)

Just thought I'd check to make sure.

Thanks.

I use the WDG Validator now that W3C has become so MSN/WebTV-unfriendly.


GEST,

That has more to do with the Webtv compatibility issues, lack of them actually. The W3C isn't doing anything wrong. I just used the validator yesterday on the PC at the Library. Worked just fine.

Later, Art.
Right you are, Art. The fault lies with the MSN/WebTV 2.8.1. update. I should have worded my statement accordingly:

I use the WDG Validator now that MSN/WebTV has become so W3C-unfriendly. :thumbsup: