承接 rbnvrw/markdown-forms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rbnvrw/markdown-forms

Composer 安装命令:

composer require rbnvrw/markdown-forms

包简介

Class to add, validate and mail simple HTML/AJAX forms via Markdown

README 文档

README

Class to add, validate and mail simple HTML/AJAX forms via Markdown. This class extends Michelf Markdown. Currently, basic <input> and <textarea> elements are supported.

Syntax

The basic syntax is as follows:

?{type}("label" "value" "placeholder" rows*cols){.class}
  • type: the type of the <input> element (required)
  • label: the label, this also gets converted to an id for the <input> element (optional)
  • value: the value of the <input> element (optional)
  • placeholder: the placeholder for the <input> element (optional)
  • rows*cols: number of rows and columns for the <textarea> element, ignored for other types (required for <textarea>)
  • class: the class of the <input> element (optional)

Example

For example, to create a Twitter Bootstrap form:

<form role="form" markdown="1">
  ?{text}("Name" "" "Name..."){.form-control}
  ?{email}("Email" "" "Email..."){.form-control}
  ?{text}("Subject" "" "Subject..."){.form-control}
  ?{textarea}("Message" "" "Message..." 3*20){.form-control}
  ?{submit}("" "Send!"){.form-control}
</form>

This gives the following output:

<form role="form">
    <div class="form-group">
        <label for="name">Name</label>
        <input name="name" id="name" placeholder="Name..." class="form-control" type="text">
    </div>
    <div class="form-group">
        <label for="email">Email</label>
        <input name="email" id="email" placeholder="Email..." class="form-control" type="email">
    </div>
    <div class="form-group">
        <label for="subject">Subject</label>
        <input name="subject" id="subject" placeholder="Subject..." class="form-control" type="text">
    </div>
    <div class="form-group">
        <label for="message">Message</label>
        <textarea name="message" id="message" placeholder="Message..." class="form-control" rows="3" cols="20"></textarea>
    </div>
    <div class="form-group">
        <input value="Send!" class="form-control" type="submit">
    </div>
</form>

The templates for <input> and <textarea> can be customised by passing them as arguments to the class.

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固