Closed FilipNest closed 8 years ago
+1
This merge seems to have broken some forms I'm working on... Does it incorporate any changes that need adding?
@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?
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
Ah, yeah, I put that in on purpose so all the forms are initialised at the same time. Good work on the function.
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.
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.