{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/14820","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/14820/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/14820/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/14820/events","html_url":"https://github.com/ampproject/amphtml/issues/14820","id":317081233,"number":14820,"title":"How can I update the state with response data in AMP-form?","user":{"login":"kamranuddin","id":38681057,"avatar_url":"https://avatars3.githubusercontent.com/u/38681057?v=4","gravatar_id":"","url":"https://api.github.com/users/kamranuddin","html_url":"https://github.com/kamranuddin","followers_url":"https://api.github.com/users/kamranuddin/followers","following_url":"https://api.github.com/users/kamranuddin/following{/other_user}","gists_url":"https://api.github.com/users/kamranuddin/gists{/gist_id}","starred_url":"https://api.github.com/users/kamranuddin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamranuddin/subscriptions","organizations_url":"https://api.github.com/users/kamranuddin/orgs","repos_url":"https://api.github.com/users/kamranuddin/repos","events_url":"https://api.github.com/users/kamranuddin/events{/privacy}","received_events_url":"https://api.github.com/users/kamranuddin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-24T06:03:34Z","updated_at":"2018-04-24T15:56:22Z","closed_at":"2018-04-24T15:56:22Z","author_association":"NONE","body":" <form method=\"post\"  action-xhr=\"/shop/1\" \" target=\"_top\" on=\"submit-success:AMP.pushState({ currentPage: currentPage+1 })\">  \r\n                   \r\n         <div submit-success  >     \r\n                <template type=\"amp-mustache\">\r\n                        {{respData}}                     \r\n                 </template>\r\n           </div>                    \r\n\r\n      <div submit-error>      \r\n               <template type=\"amp-mustache\">    \r\n                   {{respData}}                    \r\n            </template>                  \r\n     </div>                  \r\n          </form>  \r\nHow and where I update the state with \"respData\"? I try to update it with \"currentPage\" but there I think I cannot access the response data (respData). How can I do that?"},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/383985196","html_url":"https://github.com/ampproject/amphtml/issues/14820#issuecomment-383985196","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/14820","id":383985196,"user":{"login":"danielrozenberg","id":1839738,"avatar_url":"https://avatars0.githubusercontent.com/u/1839738?v=4","gravatar_id":"","url":"https://api.github.com/users/danielrozenberg","html_url":"https://github.com/danielrozenberg","followers_url":"https://api.github.com/users/danielrozenberg/followers","following_url":"https://api.github.com/users/danielrozenberg/following{/other_user}","gists_url":"https://api.github.com/users/danielrozenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/danielrozenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielrozenberg/subscriptions","organizations_url":"https://api.github.com/users/danielrozenberg/orgs","repos_url":"https://api.github.com/users/danielrozenberg/repos","events_url":"https://api.github.com/users/danielrozenberg/events{/privacy}","received_events_url":"https://api.github.com/users/danielrozenberg/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T15:56:22Z","updated_at":"2018-04-24T15:56:22Z","author_association":"COLLABORATOR","body":"Hi @kamranuddin - this is not the best forum to ask this type of questions, this is to report bugs in AMP or request features. Your best bet is to ask your question in [StackOverflow](http://stackoverflow.com/questions/tagged/amp-html) with the tag #amp-html, or try out [Slack channel](https://docs.google.com/a/google.com/forms/d/e/1FAIpQLSd83J2IZA6cdR6jPwABGsJE8YL4pkypAbKMGgUZZriU7Qu6Tg/viewform)\r\n\r\nGiven that, I believe that for your case `{{respData}}` needs to be populated in the error response from the server to be usable in that part of the template. See this doc page for more details: https://www.ampproject.org/docs/reference/components/amp-form#success/error-response-rendering"}}
{"actor":{"display_login":"danielrozenberg"}}