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

Form load order #101

Closed FilipNest closed 8 years ago

FilipNest commented 8 years ago

HTML ID attribute for forms is now based on the form token (timestamp was not good enough as it was loading them simultaniously).

Loading of JSONform now happens on document ready in a new file called clientforms.js to stop issue where forms were being loaded out of sync. Now they're all initialised at once when the page is ready.

pau1m commented 8 years ago

+1

alexbor commented 8 years ago

This merge seems to have broken some forms I'm working on... Does it incorporate any changes that need adding?

FilipNest commented 8 years ago

@alexbor hmmm... could you point out the errors? It's changed the formtoken to be more unique. Are you using multiple forms of the same type on one page?

alexbor commented 8 years ago

It was down to the form now being rendered after the scripts running in the new setup, posted a fix: https://github.com/CityWebConsultants/Iris/pull/110

FilipNest commented 8 years ago

Ah, yeah, I put that in on purpose so all the forms are initialised at the same time. Good work on the function.

alexbor commented 8 years ago

Aah makes sense. Yeah, think it's good to have a front-end hook for when the form is rendered :) My only thinking now, should we also pass the form ID into the callback function? Guess no harm in that.