Skip to content

Commit 966254b

Browse files
committed
imported legacy documentation from https://icebob.gitbooks.io/vueformgenerator/
1 parent 5fcd994 commit 966254b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2773
-0
lines changed

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# VueFormGenerator
2+
3+
VueFormGenerator is a schema-based form generator component for [Vue.js](https://github.com/vuejs/vue)
4+
5+
![Example screenshot](assets/vfg-example1.png)
6+
7+
## Demo
8+
9+
[JSFiddle simple example](https://jsfiddle.net/zoul0813/d8excp36/)
10+
11+
## Features
12+
13+
* multiple objects editing
14+
* core & full bundles
15+
* 21 field types
16+
* grouping fields
17+
* built-in validators
18+
* Bootstrap friendly templates
19+
* customizable styles
20+
* extendable with custom fields
21+
* ...etc
22+
23+
## Documentation
24+
25+
[Link to documentation on Gitbook](https://icebob.gitbooks.io/vueformgenerator/content/)
26+
27+
## More fields `*new*`
28+
29+
VueFormGenerator support custom fields.
30+
If you decide to release your custom field into the wild, please [open a new issue](https://github.com/vue-generators/vue-form-generator/issues) so we can add you to a list here!
31+
Please try to use this naming convention for your custom field : `vfg-field-*`
32+
Example :
33+
34+
* `vfg-field-myfield`
35+
* `vfg-field-calendar`
36+
* `vfg-field-awesome-dropdown`
37+
38+
This way, it will be easier for everyone to find it. Thank you !
39+
40+
## License
41+
42+
vue-form-generator is available under the [MIT license](https://tldrlegal.com/license/mit-license).
43+
44+
## Contact
45+
46+
Copyright \(C\) 2016 Icebob
47+
48+
[![@icebob](https://img.shields.io/badge/github-icebob-green.svg)](https://github.com/icebob) [![@icebob](https://img.shields.io/badge/twitter-Icebobcsi-blue.svg)](https://twitter.com/Icebobcsi)
49+

SUMMARY.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Summary
2+
3+
* [Getting started](README.md)
4+
* [Installation](installation.md)
5+
* [Usage](usage.md)
6+
* [Component](component.md)
7+
* [Schema](schema.md)
8+
* [Fields](fields/README.md)
9+
* [Field properties](fields/field_properties.md)
10+
* [Inside buttons](fields/inside_buttons.md)
11+
* [Core fields](fields/core-fields.md)
12+
* [checkbox](fields/checkbox.md)
13+
* [checklist](fields/checklist.md)
14+
* [input](fields/input.md)
15+
* [label](fields/label.md)
16+
* [radios](fields/radios.md)
17+
* [select](fields/select.md)
18+
* [submit](fields/submit.md)
19+
* [textArea](fields/textarea.md)
20+
* [Optional fields](fields/optional_fields.md)
21+
* [cleave](fields/cleave.md)
22+
* [dateTimePicker](fields/datetime.md)
23+
* [googleAddress](fields/googleaddress.md)
24+
* [image](fields/image.md)
25+
* [masked](fields/masked.md)
26+
* [noUiSlider](fields/nouislider.md)
27+
* [pikaday](fields/pikaday.md)
28+
* [selectEx](fields/selectex.md)
29+
* [rangeSlider](fields/slider.md)
30+
* [spectrum](fields/spectrum.md)
31+
* [staticMap](fields/staticmap.md)
32+
* [switch](fields/switch.md)
33+
* [vueMultiSelect](fields/vuemultiselect.md)
34+
* [Custom fields](fields/custom_fields.md)
35+
* [Groups](groups.md)
36+
* [Validation](validation/README.md)
37+
* [Built in Validators](validation/built-in-validators.md)
38+
* [Custom Validators](validation/custom-validators.md)
39+
* [Handling Validation Events](validation/validation-events.md)
40+
* [Model](model.md)
41+
* [Options](options.md)
42+

assets/README.md

Whitespace-only changes.

assets/vfg-buttons.png

2.4 KB
Loading
10.7 KB
Loading

assets/vfg-example1.png

18 KB
Loading

book.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

component.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Component
2+
3+
```html
4+
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
5+
```
6+
7+
## Properties
8+
9+
| Property | Type | Default | Description |
10+
| :--- | :--- | :--- | :--- |
11+
| [schema](schema.md) | `Object` | `none` | The schema object with fields |
12+
| [model](model.md) | `Object` | `none` | The model/target JSON object |
13+
| [options](options.md) | `Object` | `{`<br/>`validateAfterLoad: false,`<br/>`validateAsync: false,`<br/>`validateAfterChanged: false,`<br/>` validationErrorClass: "error",`<br/>`validationSuccessClass: ""`<br/>`}` | Options for the VueFormComponent |
14+
| multiple | `Boolean` | `false` | If true, we only show `multi: true` fields |
15+
| isNewModel | `Boolean` | `false` | If true, we won't run validation after load |
16+
| tag | `String` | "fieldset" | Change the main HTML element of VueFormGenerator |
17+
18+
19+

fields/README.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Fields
2+
3+
A field in the schema defines an input element to a value of model. For example, if you want to edit the `model.selections` value with a select field, you have to create a field with `select` type, what looks like this:
4+
5+
```js
6+
{
7+
type: "select",
8+
label: "Selections",
9+
model: "selections"
10+
},
11+
```
12+
13+
Each field has its own options, so be sure to check out their documentations.
14+
For example, input field need an `inputType` to be specified as well.
15+
16+
```js
17+
{
18+
type: "input",
19+
inputType: "text",
20+
label: "Name",
21+
model: "name"
22+
},
23+
```
24+
25+
## Available fields
26+
27+
### [Core fields](/fields/core-fields.md)
28+
29+
These fields are available in the core version of VueFormGenerator.
30+
31+
* [`checkbox`](checkbox.md) - Checkbox for boolean values
32+
* [`checklist`](checklist.md) - Checkbox list to select multiple values
33+
* [`input`](input.md) - Common input field `NEW!`
34+
* [`label`](label.md) - Static text \(e.g. timestamp, creation time...etc\)
35+
* [`radios`](radios.md) - Radio buttons to select `NEW!`
36+
* [`select`](select.md) - Select list
37+
* [`submit`](submit.md) - This is a simple submit button
38+
* [`textArea`](textarea.md) - Text area field
39+
40+
### [Optional fields](/fields/optional_fields.md)
41+
42+
These fields are available in the full version of VueFormGenerator. Some of these also have external dependency.
43+
44+
* [`cleave`](cleave.md) - Format input text content when you are typing
45+
* [`dateTimePicker`](datetime.md) - datetime picker with bootstrap-datetimepicker component
46+
* [`googleAddress`](googleaddress.md) - Format input text content when you are typing
47+
* [`image`](image.md) - Image select field \(URL or upload in base64 string\)
48+
* [`masked`](masked.md) - Masked text input field with maskedinput component
49+
* [`noUiSlider`](nouislider.md) - Lightweight JavaScript range slider
50+
* [`pikaday`](pikaday.md) - A refreshing JavaScript Datepicker
51+
* [`selectEx`](selectex.md) - select list with the bootstrap-select component
52+
* [`slider`](slider.md) - pretty range slider with ion.rangeSlider component
53+
* [`spectrum`](spectrum.md) - Color picker with "The No Hassle" Spectrum jQuery Colorpicker component
54+
* [`staticMap`](staticmap.md) - Display a static map from Google Maps.
55+
* [`switch`](switch.md) - Switch field \(toggle two values \(on/off, yes/no, active/inactive\)
56+
* [`vueMultiSelect`](vuemultiselect.md) - Probably the most complete selecting solution for Vue.js
57+
58+
### [Custom fields](custom_fields.md)
59+
60+
You can create custom fields too. [Check here how you can do it](custom_fields.md).

fields/checkbox.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# checkbox field
2+
This is a standard HTML checkbox input field for boolean values.
3+
4+
## Special properties of field
5+
Property | Default | Accepted values | Description
6+
--------------- | -------- | --------------------- | -----------
7+
`autocomplete` | _none_ | [see doc](https://html.spec.whatwg.org/multipage/forms.html#autofill) | Indicates whether the value of the control can be automatically completed by the browser.
8+
9+
## Usage
10+
11+
```js
12+
{
13+
type: "checkbox",
14+
label: "Status",
15+
model: "status",
16+
default: true
17+
}
18+
```

fields/checklist.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Checklist field
2+
This is a checkbox list for multiple selection. The value will be an `Array`.
3+
4+
## Special properties of field
5+
6+
Property | Default | Accepted values | Description
7+
---------- | -------- | --------------------- | -----------
8+
`listBox` | `false` | `Boolean` | If `true`, render the items as a listBox. If `false`, render as a comboBox.
9+
`values` | _none_ | `Array` or `Function` | List of items. It can be an array with items, or a `Function`, what is resulted an array. The item can be a `String`, `Boolean`, `Number` or an `Object` (with an `value` and a `name` properties). You can change `value` and `name` \(under `checklistOptions`\) to select any properties of that object as value or name.
10+
| `checklistOptions` | {} | `Object` | Settings to checklist component. See details below. |
11+
12+
### `checklistOptions`
13+
14+
| Property | Default | Accepted values | Description |
15+
| --- | --- | --- | --- |
16+
| `value` | _none_ | `String` | Used to select any properties from object in `values` to use as actual value to save in model. |
17+
| `name` | _none_ | `String` | Used to select any properties from object in `name` to use as display in the list |
18+
19+
20+
## Usage
21+
#### Listbox checklist field with array of strings:
22+
23+
```js
24+
{
25+
type: "checklist",
26+
label: "Skills",
27+
model: "skills",
28+
listBox: true,
29+
values: [
30+
"HTML5",
31+
"Javascript",
32+
"CSS3",
33+
"CoffeeScript",
34+
"AngularJS",
35+
"ReactJS",
36+
"VueJS"
37+
]
38+
}
39+
```
40+
41+
#### Combobox checklist field with `values` function:
42+
```js
43+
{
44+
type: "checklist",
45+
label: "Skills",
46+
model: "skills",
47+
values: function() {
48+
return [
49+
"HTML5",
50+
"Javascript",
51+
"CSS3",
52+
"CoffeeScript",
53+
"AngularJS",
54+
"ReactJS",
55+
"VueJS"
56+
]
57+
}),
58+
validator: validators.array
59+
}
60+
```
61+
If you select the 2nd and 4th items, the `value` will be `["Javascript", "CoffeeScript"]` in the model.
62+
63+
#### Checklist field with object values:
64+
```js
65+
{
66+
type: "checklist",
67+
label: "Roles",
68+
model: "roles",
69+
values: [
70+
{ value: "admin", name: "Administrator"},
71+
{ value: "moderator", name: "Moderator"},
72+
{ value: "user", name: "Registered User"},
73+
{ value: "visitor", name: "Visitor"}
74+
}
75+
```
76+
If you select the first and last items, the `value` will be `["admin", "visitor"]` in the model.
77+
78+
#### Checklist field with custom object values:
79+
```js
80+
{
81+
type: "checklist",
82+
label: "Ingredient",
83+
model: "ingredient",
84+
values: [
85+
{ uuid: "a11e3f4b-d4f1-45ed-87fc-4eabda4e667e", name: "Cherimoya"},
86+
{ uuid: "5ceb59c6-efe6-4c8a-a4bd-0ef621cd1e5d", name: "Pummelo"},
87+
{ uuid: "39f05038-39ba-4cb9-8508-720806dcb20b", name: "Jabuticaba"},
88+
{ uuid: "94adbe8d-f9db-481c-97c0-7198d5f3d810", name: "Kiwano melon"}
89+
],
90+
checklistOptions: {
91+
value: "uuid"
92+
}
93+
}
94+
```

0 commit comments

Comments
 (0)