{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/789","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/789/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/789/comments","events_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/789/events","html_url":"https://github.com/aldeed/meteor-autoform/issues/789","id":62566325,"number":789,"title":"Form template inside template created directly via Blaze.renderWithData errors","user":{"login":"freer4","id":9066461,"avatar_url":"https://avatars.githubusercontent.com/u/9066461?v=3","gravatar_id":"","url":"https://api.github.com/users/freer4","html_url":"https://github.com/freer4","followers_url":"https://api.github.com/users/freer4/followers","following_url":"https://api.github.com/users/freer4/following{/other_user}","gists_url":"https://api.github.com/users/freer4/gists{/gist_id}","starred_url":"https://api.github.com/users/freer4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freer4/subscriptions","organizations_url":"https://api.github.com/users/freer4/orgs","repos_url":"https://api.github.com/users/freer4/repos","events_url":"https://api.github.com/users/freer4/events{/privacy}","received_events_url":"https://api.github.com/users/freer4/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/confirmed%20bug","name":"confirmed bug","color":"e11d21"},{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/needs%20reproduction","name":"needs reproduction","color":"eb6420"},{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/will%20accept%20pull%20request","name":"will accept pull request","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/milestones/3","html_url":"https://github.com/aldeed/meteor-autoform/milestones/5.0%20Fixes","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/milestones/3/labels","id":1031777,"number":3,"title":"5.0 Fixes","description":"","creator":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":0,"state":"open","created_at":"2015-03-20T22:43:19Z","updated_at":"2015-03-21T22:04:27Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-03-18T02:23:56Z","updated_at":"2015-03-23T16:38:54Z","closed_at":null,"body":"I have an application where I'm using `Blaze.renderWithData` to insert some templates with specific data sets. I had originally had this set up to be reactive, with the template data living in one large array I'd append to and save in a session variable. This was problematic because it would reload the entirety of array each time I saved the new to the session variable, which quickly become expensive. \r\n\r\nSo, inserting them individually via `Blaze.renderWithData` works and that's all good... except for sometimes with autoform. It appears that autoform is trying to get this element before it exists in the DOM via `AutoForm.templateInstanceForForm` function. I put a log in there to confirm, the function receives the correct ID for the template, but the `getElementById` call returns null. \r\n\r\nI imagine this is Blaze and autoform tripping over each other. I will admit I'm still fairly new to Meteor so I'm not sure of all the inner workings. Is there a way around this that already exists or should this perhaps be a feature update for autoform? \r\n\r\n\r\n    Uncaught TypeError: Cannot read property 'formValues' of undefined :: autoform-inputs.js:162 \r\n    markChanged :: autoform-inputs.js:169 \r\n    updateTrackedFieldValue :: afFieldInput.js:72 \r\n\r\n\r\nI noticed this issue was attached to the innercontext helper: https://github.com/aldeed/meteor-autoform/issues/461. Could be related. \r\n\r\nUpping the setTimeout in afFieldInput.js line 71 to 500ms fixes that error, so likely confirms my theory, but I haven't tested if the delay causes other issues and setTimeout in this context seems hacky to me. "},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/comments/85085550","html_url":"https://github.com/aldeed/meteor-autoform/issues/789#issuecomment-85085550","issue_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/789","id":85085550,"user":{"login":"javaknight","id":4492571,"avatar_url":"https://avatars.githubusercontent.com/u/4492571?v=3","gravatar_id":"","url":"https://api.github.com/users/javaknight","html_url":"https://github.com/javaknight","followers_url":"https://api.github.com/users/javaknight/followers","following_url":"https://api.github.com/users/javaknight/following{/other_user}","gists_url":"https://api.github.com/users/javaknight/gists{/gist_id}","starred_url":"https://api.github.com/users/javaknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaknight/subscriptions","organizations_url":"https://api.github.com/users/javaknight/orgs","repos_url":"https://api.github.com/users/javaknight/repos","events_url":"https://api.github.com/users/javaknight/events{/privacy}","received_events_url":"https://api.github.com/users/javaknight/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T16:38:54Z","updated_at":"2015-03-23T16:38:54Z","body":"Well, I cant reproduce this with a simple gist that I created. If you like, I can upload the gist still, but it doesn't demonstrate the error..."}}