Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

xhtml / css - forms

Status
Not open for further replies.
Joined
Jun 1, 2010
Posts
548
Reaction score
2
I'm getting fairly familiar with most of xhtml and css now. The one basic area I probably don't know as much as I should about is forms. I have a couple of questions..

I have a newsletter form which has, inside the input boxes, what it is that should be input, eg. one says 'name' inside it and the other 'email'. However when you click inside the input the boxes to type your name and email, you have to manually delete 'name' and 'email'. Is there a way of making it disappear on click without using js?

And my second question is.. I have set out a form on my site for placing an advert. Once this form is filled in and submitted it goes to my email for verification before I manually post it on the site. My problem is, once you click the submit button it just opens your default email client as would any other 'mailto:' link. This doesn't come across very professional and also rules out people using a webmail address such as hotmail.

How do I make the form automatically send the information to my address on submit instead of opening an email client? Something like where you click submit you just get temporerily redirected to a page saying 'thank you for submitting a listing' before going back to the ads page. I guess this is usually done by saving to a database rather than email maybe..?
 
I'm getting fairly familiar with most of xhtml and css now. The one basic area I probably don't know as much as I should about is forms. I have a couple of questions..

I have a newsletter form which has, inside the input boxes, what it is that should be input, eg. one says 'name' inside it and the other 'email'. However when you click inside the input the boxes to type your name and email, you have to manually delete 'name' and 'email'. Is there a way of making it disappear on click without using js?

And my second question is.. I have set out a form on my site for placing an advert. Once this form is filled in and submitted it goes to my email for verification before I manually post it on the site. My problem is, once you click the submit button it just opens your default email client as would any other 'mailto:' link. This doesn't come across very professional and also rules out people using a webmail address such as hotmail.

How do I make the form automatically send the information to my address on submit instead of opening an email client? Something like where you click submit you just get temporerily redirected to a page saying 'thank you for submitting a listing' before going back to the ads page. I guess this is usually done by saving to a database rather than email maybe..?

1) Nope, javascript is simple for it though. onclick="this.value='';"/

2) PHP is needed for this. Since you're manually adding the ads you don't need to use a DB, just the mail function
 
I thought you may be the first to answer, this should be renamed the Ashton section lol.

Ok cool, js it is then, cheers.

Is there no other way I can make it send to my email without the user having to open an email client? If not then I'll either have to get it to store in a database or just give the user the information I require and ask them to just email me in the first place.

I can see alot of people would perceive it as spammy to submit a form and then have the contents of that form appear in your email client in html code
 
I thought you may be the first to answer, this should be renamed the Ashton section lol.

Ok cool, js it is then, cheers.

Is there no other way I can make it send to my email without the user having to open an email client? If not then I'll either have to get it to store in a database or just give the user the information I require and ask them to just email me in the first place.

I can see alot of people would perceive it as spammy to submit a form and then have the contents of that form appear in your email client in html code

Hah, many better designers / developers than me :) I just get a nice popup whenever this (and a few other) section updates - so I am quick to reply.

Woops, I didnt make it clear: MAIL is a function of PHP: http://php.net/manual/en/function.mail.php

Its not the same as mailto: :) So if you use that function then it will email you when they submit form.

Heres a step by step guide on using that function within the premise of a contact form:
http://www.kirupa.com/web/php_contact_form.htm
 
Last edited:
You usually seem to know the answer aswell!

Ah ok I get you, I don't know any PHP at all. I'll give the links you sent a good read, very helpful as always thanks
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom