miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

e-mail form in a message not working

 
Author Pascal
Partaker
#1 | Posted: 25 Jul 2006 11:45 
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="https://www.minibb.com/forums/{$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
Partaker
#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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑