{"action":"created","issue":{"url":"https://api.github.com/repos/formly-js/angular-formly/issues/527","labels_url":"https://api.github.com/repos/formly-js/angular-formly/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/angular-formly/issues/527/comments","events_url":"https://api.github.com/repos/formly-js/angular-formly/issues/527/events","html_url":"https://github.com/formly-js/angular-formly/issues/527","id":113648105,"number":527,"title":"updateInitialValue doesn't work with complex keys","user":{"login":"eliagentili","id":1882869,"avatar_url":"https://avatars.githubusercontent.com/u/1882869?v=3","gravatar_id":"","url":"https://api.github.com/users/eliagentili","html_url":"https://github.com/eliagentili","followers_url":"https://api.github.com/users/eliagentili/followers","following_url":"https://api.github.com/users/eliagentili/following{/other_user}","gists_url":"https://api.github.com/users/eliagentili/gists{/gist_id}","starred_url":"https://api.github.com/users/eliagentili/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliagentili/subscriptions","organizations_url":"https://api.github.com/users/eliagentili/orgs","repos_url":"https://api.github.com/users/eliagentili/repos","events_url":"https://api.github.com/users/eliagentili/events{/privacy}","received_events_url":"https://api.github.com/users/eliagentili/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-27T18:16:04Z","updated_at":"2015-10-30T13:59:51Z","closed_at":null,"body":"I noticed that the updateInitialValue doesn't work if you define a complex key in your formly form.\r\n\r\nThis not work:\r\n```\r\nform: {\r\n          options: {},\r\n          model: this.model,\r\n          fields: [\r\n            {\r\n              key: 'FieldParent.value',\r\n              type: 'input',\r\n              templateOptions: {\r\n                label: 'FieldOne'\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n```\r\n\r\nSo, if the key is something like Field.value, or maybe more sub-index, it doesn't work.\r\nWorks only with simple key like \"field\".\r\n\r\nThis Work:\r\n```\r\nform: {\r\n          options: {},\r\n          model: this.model,\r\n          fields: [\r\n            {\r\n              key: 'field',\r\n              type: 'input',\r\n              templateOptions: {\r\n                label: 'FieldOne'\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n```\r\n\r\nI think it's useful to handling sub-index in form keys, maybe editing:\r\nsrc/directives/formly-field.js:182\r\ncan fix the problem."},"comment":{"url":"https://api.github.com/repos/formly-js/angular-formly/issues/comments/152532950","html_url":"https://github.com/formly-js/angular-formly/issues/527#issuecomment-152532950","issue_url":"https://api.github.com/repos/formly-js/angular-formly/issues/527","id":152532950,"user":{"login":"MCKRUZ","id":1473014,"avatar_url":"https://avatars.githubusercontent.com/u/1473014?v=3","gravatar_id":"","url":"https://api.github.com/users/MCKRUZ","html_url":"https://github.com/MCKRUZ","followers_url":"https://api.github.com/users/MCKRUZ/followers","following_url":"https://api.github.com/users/MCKRUZ/following{/other_user}","gists_url":"https://api.github.com/users/MCKRUZ/gists{/gist_id}","starred_url":"https://api.github.com/users/MCKRUZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCKRUZ/subscriptions","organizations_url":"https://api.github.com/users/MCKRUZ/orgs","repos_url":"https://api.github.com/users/MCKRUZ/repos","events_url":"https://api.github.com/users/MCKRUZ/events{/privacy}","received_events_url":"https://api.github.com/users/MCKRUZ/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T13:59:51Z","updated_at":"2015-10-30T13:59:51Z","body":"Sure Give me a few\r\n"}}