Skip to content

Handle amp-form SSR success and error responses explicitly#25543

Merged
caroqliu merged 4 commits intoampproject:masterfrom
caroqliu:form-bindings-2
Nov 14, 2019
Merged

Handle amp-form SSR success and error responses explicitly#25543
caroqliu merged 4 commits intoampproject:masterfrom
caroqliu:form-bindings-2

Conversation

@caroqliu
Copy link
Copy Markdown
Contributor

@caroqliu caroqliu commented Nov 11, 2019

PR #25242 was recently reverted due to unexpected regression to the redirect behavior on amp-form form submissions (see #25473 for context). This PR reintroduces the changes from the original PR while maintaining prior redirect behavior.

Original PR text: SSR responses get passed fully to the submit-success and submit-error events on amp-form. These often include extra fields such as the HTML to render in the template. This change only exposes to the events the expected values of the amp-form response, such as data inserted into the form fields or relevant errors. b/138778080 cc/ @GoTcWang

@GoTcWang
Copy link
Copy Markdown
Contributor

LGTM

@caroqliu caroqliu merged commit f0e7059 into ampproject:master Nov 14, 2019
@caroqliu caroqliu deleted the form-bindings-2 branch November 14, 2019 16:23
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
…t#25543)

* Intended changes from PR ampproject#25242

* Will comments

* Revert removal of `tryResolve()` as it creates friction in unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants