{"action":"created","issue":{"url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/18","repository_url":"https://api.github.com/repos/WPF-Forge/Forge.Forms","labels_url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/18/comments","events_url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/18/events","html_url":"https://github.com/WPF-Forge/Forge.Forms/issues/18","id":328888827,"node_id":"MDU6SXNzdWUzMjg4ODg4Mjc=","number":18,"title":"Dynamic form setting initial values","user":{"login":"hashitha","id":10569142,"node_id":"MDQ6VXNlcjEwNTY5MTQy","avatar_url":"https://avatars0.githubusercontent.com/u/10569142?v=4","gravatar_id":"","url":"https://api.github.com/users/hashitha","html_url":"https://github.com/hashitha","followers_url":"https://api.github.com/users/hashitha/followers","following_url":"https://api.github.com/users/hashitha/following{/other_user}","gists_url":"https://api.github.com/users/hashitha/gists{/gist_id}","starred_url":"https://api.github.com/users/hashitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashitha/subscriptions","organizations_url":"https://api.github.com/users/hashitha/orgs","repos_url":"https://api.github.com/users/hashitha/repos","events_url":"https://api.github.com/users/hashitha/events{/privacy}","received_events_url":"https://api.github.com/users/hashitha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-06-04T02:26:41Z","updated_at":"2018-06-04T12:16:04Z","closed_at":null,"author_association":"NONE","body":"Once we load the xml string and build the form can we load some initial values. e.g. Patient name and date of birth in this case.\r\n\r\n`CompiledDefinition = FormBuilder.Default.GetDefinition(xmlString);`\r\nMaybe the returned CompiledDefinition can have the ExpandoObject which we can modify and call something like `CompiledDefinition.Reload()`\r\n\r\n\r\n\r\n```\r\n<form>\r\n  <title>ULTRASOUND WORKSHEET ABDOMEN</title>\r\n  <heading>Patient details</heading>\r\n  <row>\r\n    <col width=\"2\">\r\n \r\n    \r\n        <input type=\"string\" name=\"FirstName\" label=\"Patient name\" tooltip=\"Enter your name here.\"  >\r\n      <validate must=\"NotBeEmpty\" />\r\n   </input>\r\n  \r\n    </col>\r\n    <col>\r\n   \r\n        <input type=\"datetime?\" name=\"DateOfBirth\" label=\"Date of birth\" icon=\"calendar\" conversionError=\"Invalid date string.\">\r\n      <validate must=\"NotBeEmpty\" />\r\n      <validate must=\"BeLessThan\" value=\"2020-01-01\">You said you are born in the year {Value:yyyy}. Are you really from the future?</validate>\r\n   </input>\r\n \r\n    </col>\r\n  </row>\r\n  <row>\r\n    <col width=\"2\">\r\n     <input type=\"datetime?\" name=\"AppointmentDate\" label=\"Date\" icon=\"calendar\" conversionError=\"Invalid date string.\" /> \r\n    </col>\r\n    <col> \r\n         <input type=\"string\" name=\"Age\" label=\"Age\" > \r\n   </input> \r\n    </col>\r\n  </row>\r\n\r\n <heading>Findings</heading>\r\n\r\n  <row>\r\n        <input type=\"string\" name=\"RightKidney\" label=\"Right Kidney\" ></input>\r\n  </row>\r\n  <row>\r\n    <input type=\"string\" name=\"LeftKidney\" label=\"Left Kidney\" ></input>\r\n  </row>\r\n  <row>\r\n    <col>\r\n      <row>\r\n        <col>\r\n          <text>Bladder</text>\r\n        </col>\r\n        <col>\r\n          <input type=\"string\" name=\"BladderVol\" label=\"Bladder Vol (mm)\" ></input>\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Post Mkt.</text>\r\n        </col>\r\n        <col>\r\n          <row>\r\n            <text>VOL</text>\r\n            <input />\r\n          </row>\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Prostate:</text>\r\n        </col>\r\n        <col>\r\n          <row>\r\n            <text>VOL</text>\r\n            <input />\r\n          </row>\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Ureteric Jets:</text>\r\n        </col>\r\n        <col>\r\n          <input />\r\n        </col>\r\n      </row>\r\n      <br />\r\n      <heading>Female</heading>\r\n      <row>\r\n        <col>\r\n          <text>Uterus</text>\r\n        </col>\r\n        <col>\r\n          <input />\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Endromet.</text>\r\n        </col>\r\n        <col>\r\n          <input />\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Rt. Ovary</text>\r\n        </col>\r\n        <col>\r\n          <input />\r\n        </col>\r\n      </row>\r\n      <row>\r\n        <col>\r\n          <text>Left Ovary</text>\r\n        </col>\r\n        <col>\r\n          <input />\r\n        </col>\r\n      </row>\r\n    </col>\r\n    <col>\r\n      <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/KidneyStructures_PioM.svg/590px-KidneyStructures_PioM.svg.png\" />\r\n    </col>\r\n  </row>\r\n  <row>\r\n    <text>Comments</text>\r\n    <input />\r\n  </row>\r\n</form>\r\n```"},"comment":{"url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/comments/394333917","html_url":"https://github.com/WPF-Forge/Forge.Forms/issues/18#issuecomment-394333917","issue_url":"https://api.github.com/repos/WPF-Forge/Forge.Forms/issues/18","id":394333917,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDMzMzkxNw==","user":{"login":"hashitha","id":10569142,"node_id":"MDQ6VXNlcjEwNTY5MTQy","avatar_url":"https://avatars0.githubusercontent.com/u/10569142?v=4","gravatar_id":"","url":"https://api.github.com/users/hashitha","html_url":"https://github.com/hashitha","followers_url":"https://api.github.com/users/hashitha/followers","following_url":"https://api.github.com/users/hashitha/following{/other_user}","gists_url":"https://api.github.com/users/hashitha/gists{/gist_id}","starred_url":"https://api.github.com/users/hashitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashitha/subscriptions","organizations_url":"https://api.github.com/users/hashitha/orgs","repos_url":"https://api.github.com/users/hashitha/repos","events_url":"https://api.github.com/users/hashitha/events{/privacy}","received_events_url":"https://api.github.com/users/hashitha/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T12:16:04Z","updated_at":"2018-06-04T12:16:04Z","author_association":"NONE","body":"I tried this with no luck. Do I need to set datacontext or something like that\r\n\r\n```\r\n        private string firstName;\r\n        public string FirstName\r\n        {\r\n            get\r\n            {\r\n                return firstName;\r\n            }\r\n            set\r\n            {\r\n                firstName = value;\r\n                RaisePropertyChanged(\"FirstName\");\r\n            }\r\n        }\r\n```"}}
{"actor":{"display_login":"hashitha"}}