Hello,

Forms won't work with the last amp version v0.js "1478301221318 "

Error: form action attribute is invalid for method=POST: form#user-login​​​ v0.js (line 6, col. 342)
Error: Only XHR based (via action-xhr attribute) submissions are support for POST requests. form#user-login​​​
v0.js (line 6, col. 342)
InvalidAccessError: A parameter or an operation is not supported by the underlying object

As in the amp doc, i tried to add : <script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>

but with no result.

Any hint ?

Thank you

Comments

AhmedChebil created an issue. See original summary.

ahmedchebil’s picture

Issue summary: View changes
karimbou’s picture

Hi, I got the same issue, i tried altering the form adding action-xhr, and target="_blank" or "_top".
But now my issue is how to remove the initial "action" method in the form so only the action-xhr stays.

I'm trying to that in my subtheme AMP so it doesn't affect other forms of course, help would be appreciated :)

ahmedchebil’s picture

Matrixofdeath: it affects the login form too, and that's a bit agressive, i used the themekey module and added a /user rule that changes the theme for login page to seven or bartik, it worked once, but after the last update, it stopped.
I'm still looking for a solution.

mykhailo.levchenko’s picture

Hi guys. Did anyone find a solution to this?