Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leetaogoooo/exceltoform
通过Excel配置实现Web的表单自动生成(PHP)
https://github.com/leetaogoooo/exceltoform
php
Last synced: about 2 months ago
JSON representation
通过Excel配置实现Web的表单自动生成(PHP)
- Host: GitHub
- URL: https://github.com/leetaogoooo/exceltoform
- Owner: LeetaoGoooo
- Created: 2016-06-30T14:20:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-27T00:56:58.000Z (over 7 years ago)
- Last Synced: 2024-10-12T06:21:16.911Z (3 months ago)
- Topics: php
- Language: CSS
- Homepage:
- Size: 706 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### ExcelToForm ![](http://ww4.sinaimg.cn/large/d9e82fa4jw1fakbixx1hkj202i00kt8h.jpg)
According parse Excel And then genarate Forms
### Dependencies
1. PHP
2. PHPExcel### 关于表单样式
default styles
header .page-header
button .btn
input .form-control
radio .radio-inline
checkbox .checkbox-inline
label .label
select .select### TODO
- [x] tran excel to form
- [x] support custom style form
- [x] restore the layer of excel
- [x] support configure by ExcelToFormConf.json### How to use
Firstly,create a new Excel file, obey follow rules:
```shell
header: H:header name
label: L:label name
input: I:input name
radio: R:radio-1|radio-2|radio-3
checkbox: C:checkbox-1|checkbox-2|checkbox-3
select: S:select-1|select-2|select-3
button: B:button name
```then,you should genarate configuration firstly
```php
genarateConf()
?>
```after this,you can configure it to fit your requirements
```json
{
"tempHtmlPath": "template.html",
"isDefaultStyleEnable": true,
"defaultStylePath": "default-style.css",
"inlineStyle": {
"header": {
"id": "header"
},
"button": {
"id": "button"
},
"input": {
"id": "input"
},
"radio": {
"id": "radio"
},
"checkbox": {
"id": "checkbox"
},
"label": {
"id": "label"
},
"select": {
"id": "select"
}
}
}
```
Finally,genarate your own form```php
$a->parseFormConf(); // parse configuration
$a->genarateFormTemplates($path/to/excel);
```