The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Contact Form Coding

View previous topic View next topic Go down

Contact Form Coding

Post by THEM4VR1CKM00SE on July 11th 2012, 12:18 pm

hey guys, i just thought i would ask to see if anyone can help, im not that good with html coding, but im creating a contact form for members to email me if there is any issues etc.. well i have the coding for it..

<h2>Contact Form</h2>
<form action="" method="post">
<span style="color:#FF0000; font-weight:bold;"><?=$messages ?></span>
<table width="50%" border="0">
<tr>
<td width="50%" valign="top"><div align="right"><strong>Your Email Address : </strong></div></td>
<td width="50%" valign="top"><input type="ext" id="email" name="email" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Message Subject : </strong></div></td>
<td valign="top"><input type="ext" id="subject" name="subject" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Your Message </strong></div></td>
<td valign="top"><textarea name="message" cols="50" rows="10" id="message"></textarea></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="center">
<input type="submit" value="Send Message">
</div></td>
</tr>
</table>
<input type="hidden" name="sendmessage" value="1">
</form>

Thats the coding for it, but where in that code will i put my email adress so it goes straight there?

Thanks

THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

Back to top Go down

Re: Contact Form Coding

Post by LGforum on July 11th 2012, 1:18 pm

You have to add a mailto action.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Contact Form Coding

Post by THEM4VR1CKM00SE on July 11th 2012, 1:48 pm

can you tell/show me what that it please?

Give an example in that coding..

THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

Back to top Go down

Re: Contact Form Coding

Post by LGforum on July 11th 2012, 8:30 pm

<form action="mailto:email@domain.com" method="post">

The support for this wouldn't be great. I think it requires the user to have an email client set up on their computer like Outlook or something, but its your only choice without using any server side scripting.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Contact Form Coding

Post by THEM4VR1CKM00SE on July 11th 2012, 8:45 pm

so just for instance, if i did this

<h2>Contact Form</h2>
<form action="mailto:email@domain.com" method="post">
<form action="" method="post">
<span style="color:#FF0000; font-weight:bold;"><?=$messages ?></span>
<table width="50%" border="0">
<tr>
<td width="50%" valign="top"><div align="right"><strong>Your Email Address : </strong></div></td>
<td width="50%" valign="top"><input type="ext" id="email" name="email" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Message Subject : </strong></div></td>
<td valign="top"><input type="ext" id="subject" name="subject" size="50"/></td>
</tr>
<tr>
<td valign="top"><div align="right"><strong>Your Message </strong></div></td>
<td valign="top"><textarea name="message" cols="50" rows="10" id="message"></textarea></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="center">
<input type="submit" value="Send Message">
</div></td>
</tr>
</table>
<input type="hidden" name="sendmessage" value="1">
</form>

i added it just under the top one, is that fne and will it still work ?

THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

Back to top Go down

Re: Contact Form Coding

Post by LGforum on July 11th 2012, 8:50 pm

No you replace the old one. The old one is serving you no purpose at the moment. Its not got an action attribute (well it has buts its empty). I'd suggest reading more into how forms work and what they actually do.

You may as well remove this: <?=$messages ?>
Its server side coding which is serving you no purpose on forumotion, and will only work on a PHP file (and only if the shortcut is enabled, and there is a variable named messages)

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Contact Form Coding

Post by THEM4VR1CKM00SE on July 11th 2012, 10:40 pm

hmmm, you got any links what could help me on that acpect ?

THEM4VR1CKM00SE
Forumember

Posts : 51
Reputation : 1
Language : English

Back to top Go down

Re: Contact Form Coding

Post by LGforum on July 12th 2012, 1:08 am


LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum