Three issues with Polymer cuba-service-form reset/validation

Hello,

I’m using cuba-service-form and there are three issues I’m experiencing:

  1. It seems like it does not have a reset() function? I get a “not a function” error when I call this.$.form.reset().

https://cuba-elements.github.io/cuba-elements/components/cuba-form/#cuba-service-form

  1. The serviceParams property, which is in a two-way bind with paper-inputs, does not reset when you go to another route/URL. This is unlike cuba-login, where the form inputs always get reset when you navigate away to another route.

  2. Could you provide an example how to best perform validation on submit?

Thanks!

Hi,

There is no reset method by design. It’s not clear what should this method do, could you share your thoughts on this.

I’ve prepared example with reset and simple validation for you:

You can clone the project and run it using Studio.

Hi Vlad,

I have already solved it using iron-form which has a reset() method, while for the submit I used this.app.invokeService. But your example is also an alternative.

Thanks.