bootscore/bs-contact-form-7
Composer 安装命令:
composer require bootscore/bs-contact-form-7
包简介
Adds Bootstrap to Contact Form 7
README 文档
README
This plugin adds Bootstrap to radio buttons, checkboxes, alerts and a loading spinner to Contact Form 7. It is an additional plugin and does not replace Contact Form 7.
Demo & documentation: https://bootscore.me/documentation/bs-contact-form-7/
Installation
- Download and install Contact Form 7
- Download and install latest release bs-contact-form-7.zip.
- Set up your forms with HTML markup as below and replace your data
HTML Markup
Form
<p>Required fields are marked <span class="text-danger">*</span></p> <div class="row g-3 mb-3"> <div class="col-lg-6"> <label class="form-label d-block">Salution <span class="text-danger">*</span></label> [checkbox* salution use_label_element exclusive "Mrs." "Mr." "Other"] </div> <div class="col-lg-6"> <label class="form-label d-block">Age</label> [checkbox age use_label_element exclusive "0-18" "19-29" "30-45" "46-60"] </div> <div class="col-lg-6"> <label class="form-label d-block">I'm interested in</label> [radio interests use_label_element default:1 "Nothing" "Sports" "Cooking"] </div> <div class="col-lg-6"> <label class="form-label d-block">Date</label> [date date class:form-control] </div> <div class="col-md-6"> <label class="form-label">First name <span class="text-danger">*</span></label> [text* first-name class:form-control placeholder "Enter your first name"] </div> <div class="col-md-6"> <label class="form-label">Last name <span class="text-danger">*</span></label> [text* last-name class:form-control placeholder "Enter your last name"] </div> <div class="col-md-6"> <label class="form-label">Email <span class="text-danger">*</span></label> [email* your-email class:form-control placeholder "Enter a valid email address"] </div> <div class="col-md-6"> <label class="form-label">Where are you from? <span class="text-danger">*</span></label> [select* region class:form-select first_as_label "Choose region" "Asia" "Africa" "Europe" "North America" "South America" "Australia/Oceania"] </div> <div class="col-12"> <label class="form-label">File upload (.jpg, .jpeg, .png, max-size 3MB)</label> [file file-upload class:form-control id:form-file limit:3mb filetypes:jpg|jpeg|png] </div> <div class="col-12"> <label class="form-label">Subject</label> [text your-subject class:form-control placeholder "Quick summary"] </div> <div class="col-12"> <label class="form-label">Message <span class="text-danger">*</span></label> [textarea* message class:form-control placeholder "Your message to us"] </div> <div class="col-12"> [acceptance newsletter optional] Newsletter [/acceptance] </div> <div class="col-12"> [acceptance terms use_label_element]I have read the <a href="#" target="_blank">privacy policy</a> note. I consent to the electronic storage and processing of my entered data to answer my request. Note: You can revoke your consent at any time in the future by emailing <a href="mailto:mail@yourdomain.com">mail@yourdomain.com</a>.[/acceptance] </div> <div class="col-12"> <!-- Default CF7 [submit class:btn class:btn-primary class:w-100 "Send Message"] outputs an <input>: <input class="wpcf7-form-control wpcf7-submit has-spinner btn btn-primary w-100" type="submit" value="Send Message"> Use <button> element to add a spinner. --> <button type="submit" class="btn btn-primary wpcf7-submit w-100" disabled="disabled">Send Message</button> </div> </div>
Mail recipient
Inquiry contact form on [_site_title] from [salution] [first-name] [last-name]. Contact details: Salution: [salution] First name: [first-name] Last name: [last-name] Age: [age] Date: [date] Interests: [interests] Email: [your-email] Region: [region] Subject: [your-subject] Message: [message] [newsletter] [terms] -- This email was sent from a contact form on [_site_title]. Company name Street City Email: mail@yourdomain.com Phone: 1234567
Mail sender
Hello [salution] [first-name] [last-name], thank you for contacting us. We will answer as soon as possible. Here is a copy of your message to us: Salution: [salution] First name: [first-name] Last name: [last-name] Age: [age] Date: [date] Interests: [interests] Email: [your-email] Region: [region] Subject: [your-subject] Message: [message] [newsletter] [terms] -- This email was sent from a contact form on [_site_title]. Company name Street City Email: mail@yourdomain.com Phone: 1234567
Filter
/* * Enable vertical checks and radios layout */ add_filter('bootscore/cf7/horizontal-checks-radios', '__return_false');
License & Credits
- Contact Form 7, GNU General Public License (GPL) v2 https://github.com/takayukister/contact-form-7/blob/master/license.txt
- bs Contact Form 7, MIT License https://github.com/bootscore/bs-contact-form-7/blob/main/LICENSE
- Plugin Update Checker, YahnisElsts, MIT License https://github.com/YahnisElsts/plugin-update-checker/blob/master/license.txt
bootscore/bs-contact-form-7 适用场景与选型建议
bootscore/bs-contact-form-7 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 527 次下载、GitHub Stars 达 9, 最近一次更新时间为 2023 年 06 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「bootstrap」 「wordpress」 「contact form 7」 「bootscore」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bootscore/bs-contact-form-7 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bootscore/bs-contact-form-7 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bootscore/bs-contact-form-7 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Selectize Theme for Bootstrap 4
Plugin for YOURLS. Default tools to use in some laemmi plugins
Cross browser time implementation using CSS and JQuery. Compatible with Twitter Bootstrap
统计信息
- 总下载量: 527
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-09