CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Nojs clientside forms #302

Closed FilipNest closed 7 years ago

FilipNest commented 7 years ago

Allows forms to be pre-rendered on the server side if clientside JavaScript is disabled (if clientside JavaScript is enabled forms run as they have previously).

You'll need to run npm install for this to work as it puts in jsdom as a dependency to do the server side clientside jsonform work.

For forms that there is no point even showing without JavaScript as they have no chance of working (ajax forms etc), send a dynamicForm variable along with the form object when rendering it. This prints a translatable "<noscript>You need JavaScript enabled to display this form</noscript>" in place of the form.