[英]Joomla 2.5 - Custom hand coded form and PHP mailer - Can't find the contact.php file
I'm working on a new Joomla 2.5 site running under XAMPP . 我正在XAMPP下运行的新Joomla 2.5站点上工作。 I have written a custom estimating form in HTML as an Article.... A jQuery file for calc's and a contact.php file to email all calc's and client info.
我已经写了一篇HTML文章中的自定义估算形式。...用于calc的jQuery文件和用于通过电子邮件发送所有calc和客户信息的contact.php文件。
As for using a form plug-in I don't think this is possible because of all of the calculations ... sliders ect. 至于使用表单插件,由于所有计算...滑块等,我认为这是不可能的。 going on.
继续。
The problem is when I hit the submit button, joomla can't seem to find the contact.php file. 问题是,当我按下“提交”按钮时,joomla似乎无法找到contact.php文件。 I am running XAMPP and have located the contact.php file in the root of my project.
我正在运行XAMPP,并在我项目的根目录中找到了contact.php文件。
Here's the link to my Article with the form 这是带有以下表格的我的文章的链接
http://localhost/cleardraft/index.php/hosting/2012-02-17-02-08-39/estimate
Link which is being returned that can't be found when clicking the Submit button. 单击“提交”按钮时找不到返回的链接。 I was not expecting a link like this to the contact.php file
我没想到像这样的链接到contact.php文件
http://localhost/cleardraft/index.php/hosting/2012-02-17-02-08-39/contact.php
Sample of HTML HTML样本
<form id="wizard-form" method="post" action="contact.php" class="jWizard">
<!------normal form code stuff here----->
<button type="submit" class="button-finish" style="display: inline-block; ">Submit</button>
I have searched and searched but have found no answers online. 我已经搜索了,但是没有在网上找到答案。
(Solved by the OP in a question edit. Moved to a community wiki answer. See Question with no answers, but issue solved in the comments (or extended in chat) ) (由OP在问题编辑中解决。移至社区Wiki答案。请参阅无答案的问题,但问题已在注释中解决(或在聊天中扩展) )
The OP wrote: OP写道:
Solved... * Solved... * Solved...
解决... * 解决... * 解决...
<form id="wizard-form" method="post" action="http://localhost/cleardraft/contact.php" class="jWizard"> <--Direct Path Here.
This is was hanging out at the bottom of my HTML file!
这是在我的HTML文件的底部闲逛的! Totally forgot about!!!!!!
完全忘记了!!! this was the cause of my headache!!!
这是我头痛的原因!!!
$('form#wizard-form').bind('submit', function() {
$('.R_C_loader').show();
$.post("http://localhost/cleardraft/contact.php", <--Direct Path here and Solved it.
$("#wizard-form").serialize(),
function(reply) {
$(".R_C_message, #R_C_TopMessage").removeClass().html(reply);
$('.R_C_loader').hide();
});
return false;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.