Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp-form xhr amp-mustache not displaying returned json #1222

Closed
IamAlta opened this issue Oct 8, 2018 · 2 comments
Closed

amp-form xhr amp-mustache not displaying returned json #1222

IamAlta opened this issue Oct 8, 2018 · 2 comments
Assignees

Comments

@IamAlta
Copy link

IamAlta commented Oct 8, 2018

Description of the issue found on ampproject.org

amp-form xhr amp-mustache not displaying returned json vars

Please provide:

How do we reproduce the issue?

Please provide the steps to reproduce the issue:

On page https://www.ampproject.org/docs/reference/components/amp-form#success/error-response-rendering the first example under "Success/error response rendering" was coded.
See here for code: https://codepen.io/iamalta/pen/vVyErX

The returned json is
[{"name":"Jane Miller","interests":[{"name":"Basketball"},{"name":"Swimming"},{"name":"Reading"}],"email":"email@example.com"}]

Expected behavior
Should get the following for the above example with the mustaches completed.
"Success! Thanks {{name}} for subscribing! Please make sure to check your email {{email}}
to confirm! After that we'll start sending you weekly articles on {{#interests}}{{name}} {{/interests}}."

This is what is displayed - missing name and start date.
"Success! Thanks for subscribing! Please make sure to check your email to confirm! After that we'll start sending you weekly articles on ."

What browser are you using?
Chrome and Firefox recent vers.

What O/S are you using? n/a

@IamAlta
Copy link
Author

IamAlta commented Oct 9, 2018

@pbakaus @CrystalFaith
I spend hours on a problem and when I ask for help, I then see the problem.
This is solved.
The problem was the returned json had too many dimensions in the array. It was created as for amp-list with "items" as the parent array.

So sorry but thanks for the kick to get this solved :)

Make it a nice day. You all deserve it.

@IamAlta IamAlta closed this as completed Oct 9, 2018
@CrystalOnScript
Copy link
Collaborator

@IamAlta - Glad to hear your issue was resolved! Thanks for reaching out (and closing a resolved issue :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants