首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在安培灯箱内创建安培表单

在安培灯箱内创建安培表单
EN

Stack Overflow用户
提问于 2018-01-03 17:01:49
回答 1查看 1.4K关注 0票数 1

我正试图提交一份表格内的照明箱模式。但是弹出显示空的内容。我的代码如下:

代码语言:javascript
复制
<amp-lightbox id="success-lightbox" layout="nodisplay">
    <amp-list src="http://localhost:4000" width="auto" height="200" layout="fixed-height" items="." single-item>
        <template type="amp-mustache">
            <div class="lightbox-modal">
                <form action="/" method="get" target="_top">
                    {{#items}}
                    <input type="checkbox" value={{id}} /> {{/items}}
                    <input type="submit" value="submit" />
                </form>
            </div>
        </template>
    </amp-list>
</amp-lightbox>
<input class="" type="submit" value="show more" on="tap:success-lightbox" />

我包含了所需的所有依赖项amp-formamp-lightboxamp-listamp-mustache。如果我删除表单标签,复选框就会显示得很好。

工作守则:

代码语言:javascript
复制
<amp-lightbox id="success-lightbox" layout="nodisplay">
    <amp-list src="http://localhost:4000" width="auto" height="200" layout="fixed-height" items="." single-item>
        <template type="amp-mustache">
            <div class="lightbox-modal">
                {{#items}}
                <input type="checkbox" value={{id}} /> {{/items}}
                <input type="submit" value="submit" />
            </div>
        </template>
    </amp-list>
</amp-lightbox>
<input class="" type="submit" value="show more" on="tap:success-lightbox" />

我查过医生了。但什么也没找到。难道不可能将表单嵌套在安培灯箱内吗?如果不可能,是否有任何解决办法可以从lightbox提交数据??

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-04 08:37:22

安培-胡子不支持形式元素。在您的情况下,一个简单的解决方法是将表单标记移到amp-list元素之外。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48081868

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档