I have a website in wordpress and I am doing some pages in AMP, but I need to make a compatible form with AMP, <a href="https://ampbyexample.com/components/amp-form/" rel="nofollow noreferrer">here</a> I have the documentation, I'm having some difficulties mainly to connect the "action-xhr" with wordpress. I tried to make an eternal file but I had origin-across error.
<a href=" " rel="nofollow noreferrer"><img src=" " alt="enter image description here"></a>
<a href=" " rel="nofollow noreferrer"><img src=" " alt="enter image description here"></a>
Code:
<form target="_top" action-xhr="https://mywebsite.com/wp-admin/admin-post.php" method="post" name="test">
<input type="text" name="name" value="Name">
<input type="submit"/>
</form>