How can i add field editor using java script?

 I should be able to set model name and fields required dynamically using the javascript.

Vivek,

Check out this tutorial about dynamic creation of models, I think it’s exactly what you’re looking for!

Thanks!
Amy