Reputation: 44225
I was wondering if there is a JavaScript based HTML Form builder, similar to what you can do with Zend_Form_Html or with the ExtJS Forms but based on JQuery? There are several form related plugins but you still have to code every form manually. The idea is, that I usually only want to edit/add single entities from my Domain Model (e.g. in Doctrine with PHP), lets say a new user. I have the user as a JSON Object
{
'username': 'John',
'email': '[email protected]',
'name': 'John Doe'
'age': '33'
}
And I could also make some meta information available (e.g. the Database knows already that age must be an Integer so I already can attach that client side validator or display a nice number spinner).
{
'entity': 'User',
'email':
{
'type': 'text',
'validate': 'e-mail',
'max_lengh': 255
},
'name':
{
'type': 'text',
'validate': 'string',
'max_lengh': 255
},
'age':
{
'type': 'spinner',
'validate': 'integer',
'range': [0, 120]
}
}
With this information you could already build a scaffold form so that you only have to add/edit the additional information needed. On my quick search I unfortunately didn't find anything like that.
Upvotes: 2
Views: 3120
Reputation: 44225
Since nothing like this popped up yet, I started my own project on github (moved from Google code) called jquery.dform. It is a jQuery plugin for creating html forms via JSON.
Upvotes: 2
Reputation: 1212
I don't think there is one for jQuery that supports JSON input, but take a look at:
http://javascript.neyric.com/inputex/ for YUI
Upvotes: 1