Skip to content

Commit dd38dbf

Browse files
committed
Update README.md
1 parent 6365af6 commit dd38dbf

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

README.md

+60-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,63 @@
11
AngularFormus
22
=============
3-
43
Form generator for AngularJS
4+
5+
Usage:
6+
----
7+
```
8+
9+
<formus-form name="form.name"
10+
model="form.data"
11+
fieldsets="form.fieldsets"
12+
config="form.config">
13+
</formus-form>
14+
```
15+
16+
Available inputs:
17+
----------------
18+
- textbox
19+
- texarea
20+
- select
21+
- radio
22+
- checkbox
23+
- checklist
24+
- datetime
25+
- message
26+
- hidden
27+
28+
Form configuration:
29+
------------------
30+
Example:
31+
```
32+
form = {
33+
name: "systemParametersForm",
34+
fieldsets: [
35+
{
36+
fields: [
37+
{
38+
"name": "movePayments",
39+
"label": "Move Payments Straight To Cash",
40+
"input": "checkbox"
41+
},
42+
{
43+
"name": "cancelPendingAfter",
44+
"label": "Automatically Cancel Pending Mode Bookings after",
45+
"input": "textbox",
46+
"suffix": "days"
47+
}
48+
]
49+
}
50+
],
51+
config: {
52+
class: 'some-css-class',
53+
submit: {
54+
title: 'Save',
55+
handler: function () {
56+
console.log('I\'m submited');
57+
}
58+
}
59+
}
60+
},
61+
```
62+
63+

0 commit comments

Comments
 (0)