{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/bluele/gforms/pulls/3","id":20401682,"html_url":"https://github.com/bluele/gforms/pull/3","diff_url":"https://github.com/bluele/gforms/pull/3.diff","patch_url":"https://github.com/bluele/gforms/pull/3.patch","issue_url":"https://api.github.com/repos/bluele/gforms/issues/3","number":3,"state":"closed","locked":false,"title":"TextWidget now reuses the last submitted value.","user":{"login":"gavbaa","id":189923,"avatar_url":"https://avatars.githubusercontent.com/u/189923?v=3","gravatar_id":"","url":"https://api.github.com/users/gavbaa","html_url":"https://github.com/gavbaa","followers_url":"https://api.github.com/users/gavbaa/followers","following_url":"https://api.github.com/users/gavbaa/following{/other_user}","gists_url":"https://api.github.com/users/gavbaa/gists{/gist_id}","starred_url":"https://api.github.com/users/gavbaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavbaa/subscriptions","organizations_url":"https://api.github.com/users/gavbaa/orgs","repos_url":"https://api.github.com/users/gavbaa/repos","events_url":"https://api.github.com/users/gavbaa/events{/privacy}","received_events_url":"https://api.github.com/users/gavbaa/received_events","type":"User","site_admin":false},"body":"Currently, TextWidget won't use the value from a previous submission of the form.  I'm not 100% comfortable with my solution, as the iterating to display values for a field that should likely never be an actual array seems a little hokey.  But, that's the data type getting passed to the widget, so I stuck with it.\r\n\r\nHere was my example form that I triggered this with:\r\n\r\n\tloginForm := gforms.DefineForm(gforms.NewFields(\r\n\t\tgforms.NewTextField(\"Username\",\r\n\t\t\tgforms.Validators{\r\n\t\t\t\tgforms.Required(),\r\n\t\t\t},\r\n\t\t\tgforms.NewTextWidget(map[string]string{\"class\": \"form-control\"}),\r\n\t\t),\r\n\t\tgforms.NewTextField(\"Password\",\r\n\t\t\tgforms.Validators{\r\n\t\t\t\tgforms.Required(),\r\n\t\t\t},\r\n\t\t\tgforms.NewTextWidget(map[string]string{\"class\": \"form-control\"}),\r\n\t\t),\r\n\t))\r\n","created_at":"2014-08-27T21:00:14Z","updated_at":"2015-08-22T03:11:13Z","closed_at":"2015-08-22T03:11:13Z","merged_at":null,"merge_commit_sha":"854fecdb29867d5fecf78a6eba2ff04118466fe2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bluele/gforms/pulls/3/commits","review_comments_url":"https://api.github.com/repos/bluele/gforms/pulls/3/comments","review_comment_url":"https://api.github.com/repos/bluele/gforms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bluele/gforms/issues/3/comments","statuses_url":"https://api.github.com/repos/bluele/gforms/statuses/920d6ba1d99cdb6c724f2527a2c2c20fea4e58db","head":{"label":"gavbaa:textwidgetvalue","ref":"textwidgetvalue","sha":"920d6ba1d99cdb6c724f2527a2c2c20fea4e58db","user":{"login":"gavbaa","id":189923,"avatar_url":"https://avatars.githubusercontent.com/u/189923?v=3","gravatar_id":"","url":"https://api.github.com/users/gavbaa","html_url":"https://github.com/gavbaa","followers_url":"https://api.github.com/users/gavbaa/followers","following_url":"https://api.github.com/users/gavbaa/following{/other_user}","gists_url":"https://api.github.com/users/gavbaa/gists{/gist_id}","starred_url":"https://api.github.com/users/gavbaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavbaa/subscriptions","organizations_url":"https://api.github.com/users/gavbaa/orgs","repos_url":"https://api.github.com/users/gavbaa/repos","events_url":"https://api.github.com/users/gavbaa/events{/privacy}","received_events_url":"https://api.github.com/users/gavbaa/received_events","type":"User","site_admin":false},"repo":{"id":23403619,"name":"gforms","full_name":"gavbaa/gforms","owner":{"login":"gavbaa","id":189923,"avatar_url":"https://avatars.githubusercontent.com/u/189923?v=3","gravatar_id":"","url":"https://api.github.com/users/gavbaa","html_url":"https://github.com/gavbaa","followers_url":"https://api.github.com/users/gavbaa/followers","following_url":"https://api.github.com/users/gavbaa/following{/other_user}","gists_url":"https://api.github.com/users/gavbaa/gists{/gist_id}","starred_url":"https://api.github.com/users/gavbaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavbaa/subscriptions","organizations_url":"https://api.github.com/users/gavbaa/orgs","repos_url":"https://api.github.com/users/gavbaa/repos","events_url":"https://api.github.com/users/gavbaa/events{/privacy}","received_events_url":"https://api.github.com/users/gavbaa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gavbaa/gforms","description":"A flexible forms validation and rendering library for golang web development.","fork":true,"url":"https://api.github.com/repos/gavbaa/gforms","forks_url":"https://api.github.com/repos/gavbaa/gforms/forks","keys_url":"https://api.github.com/repos/gavbaa/gforms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gavbaa/gforms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gavbaa/gforms/teams","hooks_url":"https://api.github.com/repos/gavbaa/gforms/hooks","issue_events_url":"https://api.github.com/repos/gavbaa/gforms/issues/events{/number}","events_url":"https://api.github.com/repos/gavbaa/gforms/events","assignees_url":"https://api.github.com/repos/gavbaa/gforms/assignees{/user}","branches_url":"https://api.github.com/repos/gavbaa/gforms/branches{/branch}","tags_url":"https://api.github.com/repos/gavbaa/gforms/tags","blobs_url":"https://api.github.com/repos/gavbaa/gforms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gavbaa/gforms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gavbaa/gforms/git/refs{/sha}","trees_url":"https://api.github.com/repos/gavbaa/gforms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gavbaa/gforms/statuses/{sha}","languages_url":"https://api.github.com/repos/gavbaa/gforms/languages","stargazers_url":"https://api.github.com/repos/gavbaa/gforms/stargazers","contributors_url":"https://api.github.com/repos/gavbaa/gforms/contributors","subscribers_url":"https://api.github.com/repos/gavbaa/gforms/subscribers","subscription_url":"https://api.github.com/repos/gavbaa/gforms/subscription","commits_url":"https://api.github.com/repos/gavbaa/gforms/commits{/sha}","git_commits_url":"https://api.github.com/repos/gavbaa/gforms/git/commits{/sha}","comments_url":"https://api.github.com/repos/gavbaa/gforms/comments{/number}","issue_comment_url":"https://api.github.com/repos/gavbaa/gforms/issues/comments{/number}","contents_url":"https://api.github.com/repos/gavbaa/gforms/contents/{+path}","compare_url":"https://api.github.com/repos/gavbaa/gforms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gavbaa/gforms/merges","archive_url":"https://api.github.com/repos/gavbaa/gforms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gavbaa/gforms/downloads","issues_url":"https://api.github.com/repos/gavbaa/gforms/issues{/number}","pulls_url":"https://api.github.com/repos/gavbaa/gforms/pulls{/number}","milestones_url":"https://api.github.com/repos/gavbaa/gforms/milestones{/number}","notifications_url":"https://api.github.com/repos/gavbaa/gforms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gavbaa/gforms/labels{/name}","releases_url":"https://api.github.com/repos/gavbaa/gforms/releases{/id}","created_at":"2014-08-27T20:04:19Z","updated_at":"2014-08-19T22:42:03Z","pushed_at":"2014-08-27T20:58:04Z","git_url":"git://github.com/gavbaa/gforms.git","ssh_url":"git@github.com:gavbaa/gforms.git","clone_url":"https://github.com/gavbaa/gforms.git","svn_url":"https://github.com/gavbaa/gforms","homepage":"","size":146,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bluele:master","ref":"master","sha":"9ca9b07f1b340fc55fc06037ff81f88e5e4afb29","user":{"login":"bluele","id":1170428,"avatar_url":"https://avatars.githubusercontent.com/u/1170428?v=3","gravatar_id":"","url":"https://api.github.com/users/bluele","html_url":"https://github.com/bluele","followers_url":"https://api.github.com/users/bluele/followers","following_url":"https://api.github.com/users/bluele/following{/other_user}","gists_url":"https://api.github.com/users/bluele/gists{/gist_id}","starred_url":"https://api.github.com/users/bluele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluele/subscriptions","organizations_url":"https://api.github.com/users/bluele/orgs","repos_url":"https://api.github.com/users/bluele/repos","events_url":"https://api.github.com/users/bluele/events{/privacy}","received_events_url":"https://api.github.com/users/bluele/received_events","type":"User","site_admin":false},"repo":{"id":22345610,"name":"gforms","full_name":"bluele/gforms","owner":{"login":"bluele","id":1170428,"avatar_url":"https://avatars.githubusercontent.com/u/1170428?v=3","gravatar_id":"","url":"https://api.github.com/users/bluele","html_url":"https://github.com/bluele","followers_url":"https://api.github.com/users/bluele/followers","following_url":"https://api.github.com/users/bluele/following{/other_user}","gists_url":"https://api.github.com/users/bluele/gists{/gist_id}","starred_url":"https://api.github.com/users/bluele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluele/subscriptions","organizations_url":"https://api.github.com/users/bluele/orgs","repos_url":"https://api.github.com/users/bluele/repos","events_url":"https://api.github.com/users/bluele/events{/privacy}","received_events_url":"https://api.github.com/users/bluele/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bluele/gforms","description":"A flexible forms validation and rendering library for golang web development.Inspired by django-forms and wtforms.","fork":false,"url":"https://api.github.com/repos/bluele/gforms","forks_url":"https://api.github.com/repos/bluele/gforms/forks","keys_url":"https://api.github.com/repos/bluele/gforms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bluele/gforms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bluele/gforms/teams","hooks_url":"https://api.github.com/repos/bluele/gforms/hooks","issue_events_url":"https://api.github.com/repos/bluele/gforms/issues/events{/number}","events_url":"https://api.github.com/repos/bluele/gforms/events","assignees_url":"https://api.github.com/repos/bluele/gforms/assignees{/user}","branches_url":"https://api.github.com/repos/bluele/gforms/branches{/branch}","tags_url":"https://api.github.com/repos/bluele/gforms/tags","blobs_url":"https://api.github.com/repos/bluele/gforms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bluele/gforms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bluele/gforms/git/refs{/sha}","trees_url":"https://api.github.com/repos/bluele/gforms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bluele/gforms/statuses/{sha}","languages_url":"https://api.github.com/repos/bluele/gforms/languages","stargazers_url":"https://api.github.com/repos/bluele/gforms/stargazers","contributors_url":"https://api.github.com/repos/bluele/gforms/contributors","subscribers_url":"https://api.github.com/repos/bluele/gforms/subscribers","subscription_url":"https://api.github.com/repos/bluele/gforms/subscription","commits_url":"https://api.github.com/repos/bluele/gforms/commits{/sha}","git_commits_url":"https://api.github.com/repos/bluele/gforms/git/commits{/sha}","comments_url":"https://api.github.com/repos/bluele/gforms/comments{/number}","issue_comment_url":"https://api.github.com/repos/bluele/gforms/issues/comments{/number}","contents_url":"https://api.github.com/repos/bluele/gforms/contents/{+path}","compare_url":"https://api.github.com/repos/bluele/gforms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bluele/gforms/merges","archive_url":"https://api.github.com/repos/bluele/gforms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bluele/gforms/downloads","issues_url":"https://api.github.com/repos/bluele/gforms/issues{/number}","pulls_url":"https://api.github.com/repos/bluele/gforms/pulls{/number}","milestones_url":"https://api.github.com/repos/bluele/gforms/milestones{/number}","notifications_url":"https://api.github.com/repos/bluele/gforms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bluele/gforms/labels{/name}","releases_url":"https://api.github.com/repos/bluele/gforms/releases{/id}","created_at":"2014-07-28T14:33:34Z","updated_at":"2015-07-20T07:24:01Z","pushed_at":"2014-09-17T15:00:48Z","git_url":"git://github.com/bluele/gforms.git","ssh_url":"git@github.com:bluele/gforms.git","clone_url":"https://github.com/bluele/gforms.git","svn_url":"https://github.com/bluele/gforms","homepage":"","size":521,"stargazers_count":62,"watchers_count":62,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":0,"forks":6,"open_issues":0,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bluele/gforms/pulls/3"},"html":{"href":"https://github.com/bluele/gforms/pull/3"},"issue":{"href":"https://api.github.com/repos/bluele/gforms/issues/3"},"comments":{"href":"https://api.github.com/repos/bluele/gforms/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/bluele/gforms/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/bluele/gforms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bluele/gforms/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/bluele/gforms/statuses/920d6ba1d99cdb6c724f2527a2c2c20fea4e58db"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":3,"deletions":1,"changed_files":2}}