PDA

View Full Version : Form/Submit Button.



Rainecloud
12-11-2003, 05:29 PM
I'm currently updating a website for my boss at work, but there's one part I can't seem to get right. He has a 'submit' button underneath a 'form' which is supposed to send the filled out form to his e-mail address. Now, I can't find any sort of code on the page that I can alter to customize the button.

Basically, I want to be able to put a button on the page that submits a completed form (which I've done correctly) to a certain e-mail address. Any ideas as of how to go about this?

Thanks in advance, and I hope I'm making sense.

Flying Mullet
12-11-2003, 05:34 PM
I'm assuming that you have a submit button on the page, like so:
<input type="submit" yada yada>

If that's the case, you can use a style sheet to manipulate the look of the button like so(in a style-sheet or an in-house style attribute):
submit.Raincloud {background-color: #FAFAFA;
font-size: 11;
font-family: verdana, arial, courier, sans-serif;
color: #141414}
where the class of the submit button is "Raincloud".

And if it's just a standard button that has a javascript onclick() that does the submitting, you have a button like this:
<input type="button" value="Submit" yada yada onclick="xxxx">

and you set up your style like so:
button.Raincloud {background-color: #FAFAFA;
font-size: 11;
font-family: verdana, arial, courier, sans-serif;
color: #141414}
and again set the class of the button to "Raincloud"

Hope this helps. :)

Rainecloud
12-11-2003, 06:02 PM
But there isn't any code to tell the button to send the completed form in an e-mail to my boss' account.

Normally I'm alright with this design stuff, but I hate buttons...

Spatvark
12-11-2003, 06:29 PM
Chuck up teh code you have (attached in a html file that is) and I should be able to work it out. I don't have much experience with this kinda thing in html, but I learn quickly =P

Dr Unne
12-11-2003, 06:57 PM
In HTML, all a form does is take user input in the form of textboxes, textareas, radio buttons, dropdown menus or whatever, and transforms it into either GET or POST data, and sends that data somewhere (specified in the FORM tag by <b>action="uri_of_a_script"</b>). The script itself has to then parse the GET or POST data, and then that script can do whatever it wants with it, for example sending it somewhere via email, saving it to a file or database, generating and displaying a new HTML document using that data in some way, etc. So you need a script (Perl, Javascript maybe, whatever) in addition to an HTML document.

Burtsplurt
12-11-2003, 07:54 PM
<A HREF="http://www.scriptarchive.com/formmail.html">Form Mail</A> is probably the script you need. It's the one I've set up on my website, and it seems to work well. I had the same problem as you, Raine, in that I couldn't find an e-mail submit script, and Form Mail is what I settled on. It's certainly popular, although whether that's a good thing or not is open to question.

I think e-mailing forms used to be allowed, but there were huge problems with them. I'm pretty sure it was eliminated from HTML a long time ago.

Rainecloud
12-12-2003, 07:38 AM
In HTML, all a form does is take user input in the form of textboxes, textareas, radio buttons, dropdown menus or whatever, and transforms it into either GET or POST data, and sends that data somewhere (specified in the FORM tag by action="uri_of_a_script").

Unne, you're a saviour.

Thanks to everyone else for your assistance, too.