kirkouimet / jformer

jFormer is a form framework written on top of jQuery that allows you to quickly generate beautiful, standards compliant forms.
http://www.jformer.com/
155 stars 46 forks source link

jformer ajax form #5

Open set321go opened 13 years ago

set321go commented 13 years ago

hello,

I couldnt find a forum page so i have raised my question as an issue.

I would like to make a form using jformer that is loaded from an ajax request but all of your examples are using html with embedded php. Could you give me an example or a quick explanation of how i could build a json response that i could use to construct the form on the client side, it would be for something basic like a contact form.

thanks Alex

detain commented 10 years ago

The form is generated from the PHP itself , I dont believe it has the current capability to generate the form from a json string client side, although that might be a neat feature.

The basic reasoning for its current setup seems to be you define the form once in PHP, from there client side JS, and server side PHP validations can be applied automatically . Generating the form client side from a JSON string, while its somethign that could be added, you would still need the server side validations so you would still need some PHP code.