There is no need to create a custom element. According to the docs the following apporach is recommended:
<paper-button raised onclick="submitForm()">Submit</paper-button>
function submitForm() {
document.getElementById('form').submit();
}
so you would just bind the onclick
event to a function that manually submits your form.
UPDATE
Although the previous example from iron-form
uses onclick
event it is recommended to use on-tap
over on-click
:
Tip: Use on-tap
rather than on-click
for an event that fires
consistently across both touch (mobile) and click (desktop) devices.
It is also a good idea to use Polymers own DOM API:
function submitForm(e) {
Polymer.dom(e).localTarget.parentElement.submit();
}