Here I placed the table inside form to arrange the form items.
It does not work even though it is valid.
<form method="get" action="another.php">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%">
Number: <input type="text" name="number" />
</td>
<td width="20%" align="center">
Title: <input type="text" name="title" />
</td>
<td width="20%">
Short Desc: <input type="text" name="shortdesc" />
</td>
</tr>
</table>
</form>
When I press Enter, the form won't submit.
where as if I place a submit button anywhere inside the form, it works for both Enter key and Button click.
<input type = "submit" value="Submit" />
But I don't want any buttons for submissions. I Submit the form by pressing Enter key.
Any clues why this doesn't work ?
Add this to your form
<input type="submit" style="position: absolute; left: -9999px"/>
or
<input type="submit" style="visibility: hidden;"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With