-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Form support #1286
Comments
+1 |
The site I am working on also requires the use of Forms. +1 |
@Noacyl are you using forms directly? Or do you rely on some service, e.g. mailchimp? If directly:
|
Hello, Do you have a general estimate when the form support will be available on AMP? |
@Kadmos1 See the question above (reposting below). We'd really like to get some idea of what the forms would be used for and what you do today.
Currently, forms are supported via iframes, so it'd also be nice to hear if this is insufficient for you. |
@dvoytenko I believe the behavior should be dictated by AMP so as to:
Considering where AMP is headed, I believe this should be either a POST or, (preferably I think, as to minimize data transferred), JS (Handled by AMP) that posts the data and renders an AMP-HTML response. But then there is redrawing to think about... |
Thanks @frnco . We do currently have |
Thanks for the idea @dvoytenko iframes may work for us |
@dvoytenko wanted to share one small use case where I think an iframe is not ideal. Imagine a search bar with an auto-suggest feature. The auto-suggest list would be overlaid above elements that are positioned beneath the search bar. With iframes one would need to expand the container (not ideal for dynamic length of a returned set of suggested items), in order to accommodate the items in the list. |
I can't find what appears to be the best forum for my question so I'm posting it here, I need to use on an AMP page Google Adsense For Search (AFS) ad units. Is that possible? Can anyone help me with this? |
@flacle I see your point. But auto-suggest for search bar is a bit specific case. What do you intend to do with suggested results? Navigate? This may warrant a specialized /cc @ericlindley-g |
@dvoytenko yes it is a bit specific :) and requests to navigate to another page is one example but also site or content search, where you are filtering an internal search results page, is perhaps a worthy use case to consider. |
@dvoytenko I'd love to have the ability to build form elements using json data and ajax. If possible, I'd like to take it even a step further and have the ability to build dynamic form elements that change based on the previous selections. Our forms are currently setup to send data through ajax. We also have multi-step forms that we'd like to be able to build into the AMP framework. Since author written JavaScript is not allowed, it really handicaps our ability to build custom dynamic solutions. Although iFrames are an okay workaround, I'd like to stay away from that method if at all possible but until there is a better solution, it'll have to work. Thanks for the consideration :D |
@nicblass thanks for the feedback. a lot of what you mentioned might be out of the scope of enabling forms support in AMP but might warrant a special extension if there's a big demand for these kind of flows. I am working initially on adding the initial support for forms while keeping in mind future features and flows - #3251 - this PR is still early and would probably change a lot as we have a better understanding of the functionality AMP needs to support. Multi-step forms might be doable by the publishers once we land more features in the future where we could expose more events on the form that you can compose multi-step forms. For example: <amp-carousel id="multiStepCarouselForm">
<amp-form on="submit:multiStepCarouselForm.next" action="https://example.com/form/step1">
... fields ...
</amp-form>
<amp-form on="submit:multiStepCarouselForm.next" action="https://example.com/form/step2">
... fields ...
</amp-form>
<amp-form on="submit:multiStepCarouselForm.next" action="https://example.com/form/step3">
... fields ...
</amp-form>
</amp-carousel> In theory this should work great, but we're still working on introducing the basic form support for now. As for dynamic form elements this might be also doable by adding another extension - say <amp-dynamic-form form-specs-url="https://example.com/form1.json"></amp-dynamic-form> This extension would basically defined a specific format for dynamically generated forms - which by its own a big project and might be out of AMP scope this year. |
Working on a dynamic gpg-form for amp website, very interested in this amp-dynamic-form implementation (I need a contact form for every member of a team), thanks a lot for your time and efforts |
Please note that #3343 is the ITI for Forms support that's currently being worked on. Any feedback, please add it there. |
I am closing this issue, keeping #3343 as the general catch-all forms discussion. Feel free to open separate issues for other bugs/feature requests. |
I use the "form" tag extensively in Many of my websites with an auto-responder script from "Interspire" for collecting information requests from clients. There is No way that I can change this attribute !!! If this is an option then I am afraid I will not be using ?amp as an option. |
This is mostly a placeholder for now, but this is designed to capture our intent to support forms in some way. This would be targeted at use cases like search, collections of email addresses for newsletters, and many other experiences.
The text was updated successfully, but these errors were encountered: