miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

e-mail form in a message not working

Author Pascal
Registered
#1 | Posted: 25 Jul 2006 11:45 | Edited by: Pascal 
Hello

In one of my forum posts I placed an e-mail form. I entered the following code directly into the database with phpMyAdmin:

<form name="mail" method="post" action="mail.php">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class=caption5 width="85"><div>Name :</div></td>
<td class=caption5>
<input type="text" name="name" size="38" class=textForm>
</td>
</tr>
<tr>
<td width="85" class=caption5><div>E-mail address :</div></td>
<td class=caption5>
<input type="text" name="email" size="38" class=textForm>
</td>
</tr>
<tr>
<td width="85" class=caption5><div>Message :</div></td>
<td class=caption5>
<textarea name="message" wrap="VIRTUAL" rows=10 cols="38" style="width:450px;" class=textForm></textarea>
</td>
</tr>
<tr>
<td width="85" class=caption5></td>
<td class=caption5>
<input type="submit" name="submit" value="Submit" class=inputButton>
</td>
</tr>
</table>
</form>

It is shown correctly on the forum. But when you fill out the form and click the Submit button, mail.php doesn't load (although it's uploaded) and instead the homepage of the forum loads. Changing method="post" into method="get" does not resolve the problem.

The script worked well on my old board. What could be the problem? I'm using 2.0 Final now.

Author Paul
Lead Developer
#2 | Posted: 25 Jul 2006 13:35 
I think, it's because it will be "form inside a form", which will not work. Look in templates/main_posts.html and you discover that we have this tag:

<form action="{$main_url}/{$indexphp}" method="post" class="formStyle" id="allMsgs">

....

</form>

It is used for defining the form of message checkboxes, if you are using $enableGroupMsgDelete option enabled. I think, you can eliminate these tags, if not.

Or - try to specify "id" for your form, than instead of "Submit" button, use JavaScript handler, which will submit this form. But I don't know will it really work.

Author Pascal
Registered
#3 | Posted: 25 Jul 2006 17:47 
Pfff... tried everything but it doesn't work.
I'll remove the e-mail form from the board. After all it's not that important.

P.

Author Paul
Lead Developer
#4 | Posted: 26 Jul 2006 09:07 
I think you need just to eliminate our form tags, if you are not using group deletion... Else form inside a form most likely won't work.

Specific miniBB Support Forums / Specific / e-mail form in a message not working Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB