Welcome to MAIFANG — curated source code


Specifications

分类 script
标签 Simple Forms, 在线表单
作者 reishi
采集源 topide.com

About this source

脚本代码 分享 打印版本 举报 Simple Forms v3.2.0 - PHP在线表单系统 reishi 2025-03-16 135 0 60 源码简介“Simple Forms”不仅仅是一个简单的联系表单脚本,它是一个灵活、响应式且安全的表单解决方案,由niculucas在CodeCanyon上发布(编号25185499)。该脚本旨在为用户提供一个优质的联系表单工具,无需高级技术知识即可快速安装。它支持创建模态表单、回调请求表单、预订表单、登录/注册表单等多种类型,适用于任何HTML或PHP页面。通过AJAX和PHPMailer技术驱动,它能够实现快速、无刷新的表单提交,帮助用户自动化工作流程并节省时间。在线演示https://projects.weblucas.info/simple-forms/index.html功能特点高度可定制化提供浅色、深色、透明和渐变背景,共有5种样式(无样式、下划线、经典、经典圆角、现代、现代圆角)。支持8种颜色主题:白色、深色、淡浅色、淡深色、紫色渐变、绿色渐变、蓝色渐变、红色渐变。快速配置仅需最小的配置即可开始使用,提供基础配置指南。配备在线配置生成器,1分钟内即可完成表单设置。极致灵活性支持模态表单、回调表单、报价表单、调查表单、注册表单、预订表单等多种用途。可自由添加或删除字段类型(如输入框、下拉菜单、文本区域、复选框、文件上传等)。支持自动回复消息和可定制的电子邮件/自动回复模板。拖放文件上传支持拖放式多文件上传,可配置允许的文件扩展名和大小限制。模态表单通过简洁友好的模态表单提升潜在客户转化率,同时保护邮箱免受垃圾邮件干扰。无障碍选项支持ESC键重置和TAB键高亮功能,提升表单的可访问性。现代设计与干净代码使用HTML5和CSS3编写,符合W3C标准,代码干净且易于嵌入项目。响应式设计,移动优先,完全适配所有设备,支持Retina屏幕优化。AJAX与PHPMailer驱动通过AJAX实现无刷新提交,结合PHPMailer确保快速的表单处理。智能错误处理提供人性化的错误提示,清楚说明问题所在。Bootstrap 3+兼容可选择与Bootstrap框架集成,也可在无Bootstrap环境下使用。跨浏览器兼容在所有现代浏览器和设备上运行良好。同意复选框用户需同意条款后才能启用提交按钮。文件存储或删除可选择在表单提交后存储或删除用户上传的文件。成功页面重定向支持自定义成功页面跳转。服务器端验证可定制字段和附件的服务器端验证规则。用户IP定位通过IP定位显示用户信息。JSON响应与多语言支持提供格式化的JSON服务器响应。支持前端/后端字符串翻译,已内置2种语言。丰富文档与支持提供15+实时示例和详细的逐步指南。提供及时的支持和免费更新。系统需求服务器环境PHP版本:PHP 8.0或更高版本。Web服务器:Apache、Nginx或其他支持PHP的服务器。邮件功能:需要服务器支持PHP的mail()函数或配置SMTP服务(PHPMailer支持SMTP)。客户端要求现代浏览器(Chrome、Firefox、Safari、Edge等),需支持HTML5、CSS3和jаvascript。jаvascript必须启用,以支持AJAX和Vanilla JS功能。依赖库PHPMailer:通常包含在脚本中,用于邮件发送。Bootstrap(可选):若使用预设样式,需引入Bootstrap 3+(可能自带或需手动添加)。文件权限若启用文件上传功能,服务器上的上传目录需具有写权限(通常为chmod 755或777,视服务器配置而定)。其他一个有效的电子邮件地址,用于接收表单数据。可选的SMTP配置。下载地址 .dlepay-box{border:1px solid rgba(128,128,128,.28);border-radius:14px;padding:18px 20px;margin:18px 0;background:rgba(128,128,128,.06);box-shadow:0 6px 20px rgba(15,23,42,.05);font-size:14px;line-height:1.7;color:inherit} .dlepay-box.dlepay-free,.dlepay-box.dlepay-paid{border:1px solid rgba(34,197,94,.5);background:rgba(34,197,94,.09);box-shadow:none} .dlepay-head{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap} .dlepay-badge{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:rgba(15,118,110,.92);color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em;white-space:nowrap} .dlepay-free .dlepay-badge,.dlepay-paid .dlepay-badge{background:rgba(22,163,74,.92)} .dlepay-head__text{flex:1;min-width:200px;font-size:14px;line-height:1.7;color:inherit} .dlepay-head__text b{color:#ef4444;font-size:16px} .dlepay-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px} .dlepay-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;padding:0 18px;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;text-decoration:none;border:1px solid transparent;transition:transform .15s ease,box-shadow .15s ease;font-family:inherit} .dlepay-btn:active{transform:translateY(1px)} .dlepay-btn-primary{background:#1677ff;color:#fff;box-shadow:0 8px 18px rgba(22,119,255,.22)} .dlepay-btn-primary:hover{background:#0f62d9;color:#fff} .dlepay-btn-ghost{background:transparent;color:inherit;border-color:rgba(128,128,128,.42)} .dlepay-btn-ghost:hover{background:rgba(128,128,128,.14)} .dlepay-sub{margin-top:8px;font-size:12px;color:inherit;opacity:.62} .dlepay-note{margin-bottom:10px;font-size:13px;font-weight:700;color:#16a34a} .dlepay-content{margin-top:12px;padding:14px 16px;border:1px dashed rgba(128,128,128,.42);border-radius:10px;background:transparent} .dlepay-modal{position:fixed;left:0;top:0;right:0;bottom:0;z-index:99999;display:none;color:inherit} .dlepay-modal.is-open{display:block} .dlepay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(15,23,42,.55)} .dlepay-modal__dialog{position:relative;width:min(92vw,360px);margin:10vh auto 0;background:#fff;color:#0f172a;border-radius:16px;padding:22px 22px 18px;box-shadow:0 24px 60px rgba(15,23,42,.35);text-align:center} .dlepay-modal__title{font-size:16px;font-weight:800;color:#0f172a;margin-bottom:14px} .dlepay-modal__close{position:absolute;top:8px;right:12px;border:0;background:transparent;font-size:22px;line-height:1;color:#94a3b8;cursor:pointer} .dlepay-modal__close:hover{color:#0f172a} .dlepay-loading{font-size:13px;color:#94a3b8;padding:30px 0} .dlepay-qr{display:none;width:220px;height:220px;margin:0 auto;border-radius:10px;border:1px solid rgba(128,128,128,.3);background:#fff} .dlepay-status{margin-top:12px;font-size:13px;line-height:1.7;color:#334155;min-height:20px} .dlepay-status b{color:#ef4444;font-size:15px} .dlepay-ok{color:#16a34a;font-weight:700} .dlepay-err{color:#ef4444;font-weight:700} [data-theme="dark"] .dlepay-box{background:rgba(255,255,255,.035);border-color:rgba(255,255,255,.14);box-shadow:none} [data-theme="dark"] .dlepay-box.dlepay-free,[data-theme="dark"] .dlepay-box.dlepay-paid{background:rgba(34,197,94,.1);border-color:rgba(34,197,94,.45)} [data-theme="dark"] .dlepay-head__text b,[data-theme="dark"] .dlepay-status b,[data-theme="dark"] .dlepay-err{color:#f87171} [data-theme="dark"] .dlepay-ok{color:#4ade80} [data-theme="dark"] .dlepay-btn-primary{background:#2f81f7;box-shadow:none} [data-theme="dark"] .dlepay-modal__dialog{background:#1e2228;color:#e6e6e6;box-shadow:0 24px 60px rgba(0,0,0,.65)} [data-theme="dark"] .dlepay-modal__title{color:#f1f5f9} [data-theme="dark"] .dlepay-modal__close{color:#9aa4b2} [data-theme="dark"] .dlepay-modal__close:hover{color:#fff} [data-theme="dark"] .dlepay-loading{color:#9aa4b2} [data-theme="dark"] .dlepay-status{color:#cbd5e1} @media (max-width:480px){.dlepay-box{padding:14px}.dlepay-btn{width:100%}} × 扫码支付 正在加载… (function(){ if (window.dlePayReady) { return; } window.dlePayReady = true; var CFG = {"url":"https:\/\/topide.com\/index.php?do=pay","qr":"https:\/\/topide.com\/index.php?do=alipaypay&action=qr&data=","token":"4454a01b5583578770b54619f3c0e66f0b645761","currency":"积分"}; function el(id) { return document.getElementById(id); } window.dlePayOpen = function(){ var m = el('dlepay-modal'); if (m) { m.className = 'dlepay-modal is-open'; m.setAttribute('aria-hidden','false'); } }; window.dlePayClose = function(){ var m = el('dlepay-modal'); if (m) { m.className = 'dlepay-modal'; m.setAttribute('aria-hidden','true'); } }; window.dlePayStatus = function(html, cls){ var s = el('dlepay-status'); if (!s) { return; } s.className = 'dlepay-status' + (cls ? ' ' + cls : ''); s.innerHTML = html; }; window.dlePayLoading = function(on){ var l = el('dlepay-loading'); var q = el('dlepay-qr'); if (l) { l.style.display = on ? 'block' : 'none'; } if (on && q) { q.style.display = 'none'; } }; function post(action, data, callback){ var fd = new FormData(); fd.append('action', action); fd.append('token', CFG.token || ''); for (var k in data) { if (Object.prototype.hasOwnProperty.call(data, k)) { fd.append(k, data[k]); } } fetch(CFG.url, { method: 'POST', body: fd, credentials: 'same-origin', headers: { 'X-Requested-With': 'XMLHttpRequest' } }).then(function(r){ return r.json(); }).then(function(d){ callback(d || { status: 'error', message: '返回数据异常' }); }).catch(function(){ callback({ status: 'error', message: '网络错误,请稍后重试' }); }); } window.dlePayScan = function(tagId, newsId){ window.dlePayOpen(); window.dlePayLoading(true); window.dlePayStatus('正在生成支付二维码…'); post('create', { tag_id: tagId, news_id: newsId }, function(d){ window.dlePayLoading(false); if (d.status === 'success') { if (d.free || d.paid) { window.dlePayStatus('已解锁,正在刷新…'); setTimeout(function(){ location.reload(); }, 500); return; } var q = el('dlepay-qr'); if (q) { q.src = CFG.qr + encodeURIComponent(d.qr_code); q.style.display = 'block'; } window.dlePayStatus('请使用支付宝扫码支付 ' + d.amount + ' 元(' + d.price + ' ' + (CFG.currency || '') + ')'); window.dlePayPoll(d.out_trade_no); } else { window.dlePayStatus('' + (d.message || '下单失败') + ''); } }); }; window.dlePayPoll = function(outTradeNo){ var tries = 0; function tick(){ tries ++; if (tries > 200) { window.dlePayStatus('二维码已过期,请关闭后重新下单'); return; } post('query', { out_trade_no: outTradeNo }, function(d){ if (d.status === 'paid') { window.dlePayStatus('支付成功,正在刷新…'); setTimeout(function(){ location.reload(); }, 600); return; } if (d.status === 'closed') { window.dlePayStatus('订单已关闭,请重新下单'); return; } setTimeout(tick, 3000); }); } setTimeout(tick, 2500); }; window.dlePayBalance = function(tagId, newsId){ if (!window.confirm('确认使用余额支付?')) { return; } window.dlePayOpen(); window.dlePayStatus('正在处理…'); post('balance', { tag_id: tagId, news_id: newsId }, function(d){ if (d.status === 'success') { window.dlePayStatus('支付成功,正在刷新…'); setTimeout(function(){ location.reload(); }, 500); } else { window.dlePayStatus('' + (d.message || '支付失败') + ''); } }); }; })(); 付费内容此部分内容需要支付 10 积分 后查看,请先登录。 标签 Simple Forms在线表单

Information is compiled from public listings; confirm the final price and support with our service desk.

Request a quote

Leave your contact and we will get back to you shortly. No spam.

Leave your contact and we will get back to you shortly. No spam.

Related sources

View all→
← Back to list