Polymer paper-input and form submission

2019-07-19 16:48发布

I'm working on a forum theme and started using web components but the form elements don't work.

I have stuff like this:

<input type="text" name="subject" maxlength="85" value="{$subject}" tabindex="1" />

and I tried translating it like that

<paper-input floatinglabel="" label="{$lang->thread_subject}" type="text" name="subject" maxlength="85" value="{$subject}" tabindex="1"></paper-input>

and all kind of variations also nesting the element inside but it doesn't work.

Same goes for all other input elements like submit buttons, checkboxes etc.

2条回答
Viruses.
2楼-- · 2019-07-19 17:19

You can try something like this - http://jsbin.com/kurelaji/2/edit

查看更多
贪生不怕死
3楼-- · 2019-07-19 17:38

For Polymer 1.0 see the new Iron Form element.

查看更多
登录 后发表回答