forked from daffl/jquery.dform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
60 lines (47 loc) · 1.84 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Title: Home
The jQuery.dForm plugin allows you to create your HTML forms programmatically from JavaScript objects
(and therefore JSON, too).
Usage:
(start code)
var formdata =
{
"action" : "index.html",
"method" : "get",
"elements" :
[
{
"name" : "textfield",
"label" : "Label for textfield",
"type" : "text",
"value" : "Hello world"
},
{
"type" : "submit",
"value" : "Submit"
}
]
};
$("#myform").buildForm(formdata);
// Or to load the form definition via AJAX
$("#myform").buildForm("http://example.com/myform.json");
(end)
How to get it:
<Download jQuery.dForm 0.1.3 at http://github.com/downloads/daffl/jquery.dform/jquery.dform-0.1.3.tar.gz>
How to get involved:
* Visit the <jQuery.dForm Google Group at http://groups.google.com/group/jquery-dform>
* Fork the project on <GitHub at http://github.com/daffl/jquery.dform/>
* Follow <@daffl at http://twitter.com/daffl> on Twitter
What it is for:
There are many server side web frameworks that support HTML form generation,
but you often end up mixing client (e.g. JavaScript validation) and server side processing concerns together.
This plugin moves the generation of forms entirely on the client side so that the server just has to provide a
JavaScript object (usually as JSON) that contains all the information needed to create this form.
It is easily extensible for custom form elements and properties.
You should try this plugin if you want to
* manage all your form related jQuery plugins in a unified way (jQuery UI and the Validation plugin
supported out of the box)
* scaffold forms from business objects of your server side framework
* have an easy way to include jQuery UI elements and JavaScript validation
* write JavaScript instead of HTML markup since your page doesn't run without JS anyway
Examples:
See some live demos at the <Examples> page.