AMP form issue
What's the issue?
In last few hours AMP form doesn't send form variables within request.
How do we reproduce the issue?
In second form, for example, if you fill data and press "Subscribe", entered data will not be sent to server and always same message will be shown: "Success! Thanks for trying the amp-form demo! Try to insert the word "error" as a name input in the form to see how amp-form handles errors.". Without {{name}} (in message) parameter, because this parameter was not sent to server. Same message is shown if you enter "error".
What browsers are affected?
I tried Safari, Firefox and Chrome- all same.
Which AMP version is affected?
amp-form-0.1.js
I confirm that AMP POST forms using XHR are not working.
Example: Try to rate here: https://www.teksteshqip.com/dhurata-dora
I haven't made any changes.
Might be due to this https://github.com/ampproject/amphtml/pull/12084 which just made it to prod
Thanks for reporting and sorry for the breakage. We are rolling back the release from last night (going back to version 1510956201635) until this is fixed.
The problem is instanceof FormDataWrapper doesn't work as expected.
https://github.com/ampproject/amphtml/blob/8bf675697b15d9dcd7b3805a2f5053a06ac4fe8e/src/service/xhr-impl.js#L153
One simple fix is to check existence of getFormData function instead.