Having a problem with an email form. When clicking submit doesn't recognize page. Am I missing something really obvious? I've replaced 'your email address' for a valid email address in VALUE.
Here is the code:
<form method="post" action="http://www.ftp://www.users.greenbee.net//cgi-bin/FormMail.pl" name="MyForm">
<input type="hidden" name="recipient" value="YOUR EMAIL ADDRESS" />
<input type="hidden" name="sort" value="order:FirstName,Surname,emailaddress,Comments" />
<center>
<table border="0" width="64%" bgcolor="#c0c0c0">
<tr>
<td width="41%" align="center"><strong>First Name</strong></td>
<td width="59%" align="center"><input type="text" name="FirstName" size="24" /></td>
</tr>
<tr>
<td width="41%" align="center"><strong>Surname</strong></td>
<td width="59%" align="center"><input type="text" name="Surname" size="24" /></td>
</tr>
<tr>
<td width="41%" align="center"><strong>E-mail Address</strong></td>
<td width="59%" align="center"><input type="text" name="emailaddress" size="24" /></td>
</tr>
<tr>
<td width="41%" align="center"><strong>Comments on my webpage</strong></td>
<td width="59%" align="center"><textarea rows="3" cols="24" name="Comments"></textarea></td>
</tr>
<tr>
<td width="41%" align="center"><input type="submit" value="Send Form" name="SendForm" /></td>
<td width="59%" align="center"><input type="reset" value="Clear Form" name="ClearForm" /></td>
</tr>
</table>
</center>
</form>
The form action is all messed up.
It should be either http:// or ftp:// you can't combine both.
From quick trial and error, this one "works" though requires authentication:
ftp://www.users.greenbee.net/cgi-bin/FormMail.pl
you have invalid Action Page with this
see There is a two Protocols
Http and FTP..
I think it is wrong.
check your action path. it must be absolute location of your FormMail.pl.
be sure starts with http:// or ftp://
There’s a relatively new service called Slapform that allows you to send yourself form submissions via email. All you have to do is set the form’s method to POST and point the form’s action to https://api.slapform.com/your#email.com. It’s very simple and easy to use:
<form method="POST"
action="https://api.slapform.com/your#email.com">
<input type="email" name="email">
<textarea type="text" name="message"></textarea>
<button type="submit">Submit</button>
</form>
Related
This question already has answers here:
HTML form email using mailto in form action doesnt work in Internet Explorer
(3 answers)
Closed 4 years ago.
I made a simple form to meet the needs on my website. It was as wanted, however, I am not able to use the "mailto" function to send the information provided by the user to my email.
After pressing the "send" button, no action is taken. can anybody help me?
NOTE: The form is HTML-only, no database usage, it's just an e-mail bridge.
<div class ="Formulario">
<div align="center">
<form id="form1" name="formulario" method="post" action="mailto:helpcelere#gmail.com">
<table width="200" height="250" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><input name="txt_nome" type="text" form="form1" placeholder="Nome" /></td>
</tr>
<tr>
<td><input name="txt_titulo" type="text" id="txt_titulo" form="form1" placeholder="Título do problema" titulo="txt_titulo" /></td>
</tr>
<tr>
<td><input name="txt_email" type="text" id="txt_email" form="form1" placeholder="Seu e-mail" email="txt_email" /></td>
</tr>
<tr>
<td><textarea cols="50" rows="8" form="form1" placeholder="Mensagem"></textarea></td>
</tr>
<tr>
<td><input type="submit" form="form1" formaction="mailto:helpcelere#gmail.com" formmethod="POST" value="enviar" /></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
try this instead
<div class ="Formulario">
<div align="center">
<form id="form1" name="formulario" method="post" action="mailto:helpcelere#gmail.com">
<table width="200" height="250" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><input name="txt_nome" type="text" form="form1" placeholder="Nome" /></td>
</tr>
<tr>
<td><input name="txt_titulo" type="text" id="txt_titulo" form="form1" placeholder="Título do problema" titulo="txt_titulo" /></td>
</tr>
<tr>
<td><input name="txt_email" type="text" id="txt_email" form="form1" placeholder="Seu e-mail" email="txt_email" /></td>
</tr>
<tr>
<td><textarea cols="50" rows="8" form="form1" placeholder="Mensagem"></textarea></td>
</tr>
<tr>
<td><input type="submit" value="enviar" /></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
My code, HTML 4.01 Transitional:
<table cellspacing="0" cellpadding="0" border="0" class="forms" id="form-control-number">
<tr>
<td colspan="6" align="right">
<span class="nadpis">Pole pro 14 pozic (*)</span>
</td>
</tr>
<form action="">
<tr>
<td><label class="required" for="numero">GTIN-8</label></td>
<td><INPUT id="numero" class="middle" TYPE="text" NAME=numero SIZE=17 MAXLENGTH=7></td>
<td><INPUT class="text-small" TYPE="text" NAME=cc SIZE=1 READONLY></td>
<td><INPUT class="submit" TYPE="submit" VALUE="Vypočti" ONCLICK="ccc8(this.form); return false;"></td>
<td class="reset-col"><INPUT class="submit" TYPE="reset" VALUE="Vymaž"></td>
<td><INPUT class="text" TYPE="text" NAME=chiffre SIZE=14 MAXLENGTH=14 READONLY><span class="hidden-desktop hidden-tablet">Pole pro 14 pozic (*)</span></td>
</tr>
</form>
<form action="">
<tr>
<td><label class="required" for="numero2">GTIN-12</label></td>
<td><INPUT id="numero2" class="middle" TYPE="text" NAME=numero SIZE=17 MAXLENGTH=11></td>
<td><INPUT class="text-small" TYPE="text" NAME=cc SIZE=1 READONLY></td>
<td><INPUT class="submit" TYPE="submit" VALUE="Vypočti" ONCLICK="ccc12(this.form); return false;"></td>
<td class="reset-col"><INPUT class="submit" TYPE="reset" VALUE="Vymaž"></td>
<td><INPUT class="text" TYPE="text" NAME=chiffre SIZE=14 MAXLENGTH=14 READONLY><span class="hidden-desktop hidden-tablet">Pole pro 14 pozic (*)</span></td>
</tr>
</form>
</table>
The validator is writing: document type does not allow element "FORM" here (line 7)
document type does not allow element "TR" here (line 8)
Does anyone know why this error is happening?
You can't add a form element as a direct child of a <table> or <tr> element. Try surrounding the <table> with your <form>.
I have an HTML page with input fields and two buttons: Submit and Reset. When the user clicks on Submit, the required validation messages come up, that's fine, but they also come up when clicking Reset.
HTML:
<html>
<body>
<form action="insertVoucherCategory" method="post">
<table>
<tr>
<td>Voucher Category</td>
<td> </td>
<td><input name="voucherCategory" id="voucherCategory" title="Please Enter Voucher Category" required="required" placeholder="Enter Voucher Category" tabindex="1" /></td>
</tr>
<tr>
<td>Description</td>
<td> </td>
<td><input name="description" id="description" title="Please Enter Description" required="required" placeholder="Enter Description" tabindex="2" /></td>
</tr>
<tr>
<td><input type="submit" id="btnAdd" value="Submit" tabindex="3"/></td>
<td> </td>
<td><input type="reset" id="btnReset" value="Reset" tabindex="4"/></td>
</tr>
<table>
</form>
</body>
</html>
This is what happens on Reset:
This is what I want:
<input type="button" value="Reset" onclick="hideMsg()" />
function hideMsg(){
$('.errMsg').hide();
$('.required').val('');
$('.required').addClass('blueBorder');
$('.required').removeClass('redBorder');
}
Use the type="reset" attribute on an <input> or <button> to automatically use HTML5 validation to clear the validation highlighting.
Tested satisfactorily on IE11 and Edge on Windows 10...
I'm not sure what I'm missing here. I'm just trying to get the submit button to send the information to my email. What am I doing wrong? Sorry for all the table code, had to be a table for an assignment.
<form method="post" action="mailto:suzanne#nielsenwebdesigns.com" > <table width="478" align="center">
<tr>
<td width="166" style="font-family: 'Letter Gothic Std', 'Lithos Pro Regular', 'Mesquite Std', 'Trebuchet MS'">Name:
</td>
<td width="281">
<input name="name" type="text" required id="name" title="name" size="30">
</td>
</tr>
<tr>
<td>Email:
</td>
<td><input name="email" type="text" required id="email" title="email" size="30"></td>
</tr>
<tr>
<td>Phone:</td>
<td><input name="phone" type="text" id="phone" size="30"></td>
</tr>
<tr>
<td>Subject:</td>
<td><select name="subject" required id="subject" title="subject">
<option value="info">General Information</option>
<option value="web design">Web Design</option>
<option value="hosting">Hosting services</option>
<option value="logo design">Logo Design</option>
</select></td>
</tr>
<tr>
<td>How did you hear of us?</td>
<td>
<label>
<input type="radio" name="how did you hear" value="friend" id="howdidyouhear_0">
friend
</label>
<label>
<input type="radio" name="how did you hear" value="search" id="howdidyouhear_1">
search
</label>
<label>
<input type="radio" name="how did you hear" value="ad" id="howdidyouhear_2">
ad
</label>
</td>
</tr>
<tr>
<td>Message:</td>
<td><textarea name="message" cols="60" rows="15" id="message" title="message">
</textarea>
</td>
</tr>
<tr>
<td><input name="clear" type="image" id="clear" src="clear.png" alt="clear" /></td>
<td>
<input name="submit" type="image" id="submit" src="submit.png" alt="submit" value="send email" />
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</form>
are you dutch? a lot of dutch people have that name ;) )
I think what you're trying to do is send information which is in an input field to your e-mail adress. You can do this using PHP and maybe some other solution, but i dont know them.
For sending the mail with php i would recommend using something like this:
first change the html to:
<form action="mail.php" method="post">
<textarea cols='40' rows='7' name='mailcontent'></textarea>
<input type="submit" value="Submit"/>
</form>
Then create a file called "mail.php" and add this code to it:
<?php
$mail_content = $_POST['mailcontent'];
$mail_subject = "a subject you like, can not be removed."
$mail_to = "suzanne#nielsenwebdesigns.com";
$mail = mail($mail_to, $mail_subject, $mail_content);
if($mail){echo "Success!";}else{echo "Something went wrong, please try again later.";}
?>
or if you just want to let please send a mail themselves i suggest you use this:
Click here to send me a mail
my question is how would I use an HTML::Template tag inside a value of form field to change that field. For example
<table border="0" cellpadding="8" cellspacing="1">
<tr>
<td align="right">File:</td>
<td>
<input type="file" name="upload" value= style="width:400px">
</td>
</tr>
<tr>
<td align="right">File Name:</td>
<td>
<input type="text" name="filename" style="width:400px" value="" >
</td>
</tr>
<tr>
<td align="right">Title:</td>
<td>
<input type="text" name="title" style="width:400px" value="" />
</td>
</tr>
<tr>
<td align="right">Date:</td>
<td>
<input type="text" name="date" style="width:400px" value="" />
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="button" value="Cancel">
<input type="submit" name="action" value="Upload" />
</td>
</tr>
</table>
I want the value to have a <TMPL_VAR> variable in it.
You use it the same way you'd use a template variable anywhere else:
<input type="text" name="date" style="width:400px" value="<TMPL_VAR NAME=date>" />
Yeah, it's ugly and it breaks your HTML validator. Which is one of the many reasons why I like Template Toolkit better.