最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

JavaScript to generaterender dynamic HTML form from JSON or similar data? - Stack Overflow

programmeradmin4浏览0评论

I would like to offer viewers a contact form that is modified according to the user's input. An example of such a form is on the Ext JS site. I have not looked into the product, but I would like to know if there are any other programs/functions that generate such a form dynamically? I found only samples on adding other input elements to existing forms.

I would like to offer viewers a contact form that is modified according to the user's input. An example of such a form is on the Ext JS site. I have not looked into the product, but I would like to know if there are any other programs/functions that generate such a form dynamically? I found only samples on adding other input elements to existing forms.

Share Improve this question edited Feb 19, 2011 at 12:52 none asked Feb 18, 2011 at 13:52 nonenone 2752 gold badges5 silver badges10 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Here are some other implementations:

  • http://neyeon./p/jquery.dform/ (depends on jQuery)
  • http://neyric.github./inputex/ (depends on YUI)
  • http://robla/jsonwidget/

I also plan to add this functionality to my own js-forms library, which would also handle validation.

You can always create whatever DOM structure you like using JavaScript. Be it additional inputs or even additional FORM elements. It then depends of course what you use on the server side to process form data and how you do that.

Maybe I haven't understood the nature of your problem because you haven't explained yourself too good.

ExtJS is a JavaScript library that does everything on the client side. It also provides the ability to rapidly create user interface by providing Javascript configuration objects that will result in rich widget creation.

You can do lots with jQuery (and jQueryUI) as well, but it's up to you how to do it. ExtJS just has these very functionally rich and visually consistent set of client controls/widgets that you can use out of the box without much additional development (not to mention bug killing that es along custom development).

For instance: When writing an Asp MVC application it's very easy to issue an Ajax call that would return HTML of so called partial view with plete HTML of your form that you can then easily display in a modal dialog for instance.

If you do need all that functionality to create a desktop-like application I suggest you do take a plunge into ExtJS because it is definitely a very good product. I've used it about 3 years ago (version 2) on some project and I was amazed by the work they've done with it. It's very feature rich product that makes it really easy to create desktop like web applications.

But if you're after a usual web site then a desktop-like experience is probably not what you should give to your visitors.

发布评论

评论列表(0)

  1. 暂无评论