【问题标题】:Loading PHP webform in Magnific Popup Modal在 Magnific Popup Modal 中加载 PHP webform
【发布时间】:2014-05-20 20:48:28
【问题描述】:

我一直在创建一些网络表单,目的是为 IT 设备设置会议请求。

我有一个预制的表单 (equip_meeting.php),它使用 CSS 进行样式化,我想在 Magnific Popup Modal 中加载它。

输入数据并确认验证后,表单会将数据提交到equip_meeting_mail.php 页面,以格式化电子邮件发送到指定的邮箱。

模态框将关闭,用户将被发送到邮件发送成功消息输出的确认页面。

我正在使用下面的测试页面代码,无法加载php表单。

以下是弹出页面代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" type="text/css" href="itform.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="magnific-popup/magnific-popup.css">
<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<!-- Magnific Popup core JS file -->
<script src="magnific-popup/jquery.magnific-popup.js"></script> 
<script language="javascript">
$(function () {
    $('.popup-modal').magnificPopup({
        type: 'inline',
        preloader: false,
        modal: true
    });
    $(document).on('click', '.popup-modal-dismiss', function (e) {
        e.preventDefault();
        $.magnificPopup.close();
    });
});

  $(function() {
    $( "#Borrow_Date" ).datepicker();
    $( "#Return_Date" ).datepicker();
  });

   $(function() {
    $( document ).tooltip();
  });
</script>
</head>
<body>
<!-- link that opens popup -->
<a class="popup-modal" href="#form">Open modal</a>

<!-- form itself -->
<div id="form" class="container white-popup-block mfp-hide">
<?php include "equip_meeting.php" ?>
<center><p><a class="popup-modal-dismiss" href="#">Dismiss</a></p></center>
</div>

</body>
</html>

正在打开的页面是一个样式化的表单页面。

【问题讨论】:

    标签: php forms modal-dialog magnific-popup


    【解决方案1】:

    显然,equip_meeting.php 周围的单引号解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多