We need to have an additional TextField added to the LoginForm. We can do this easily in Vaddin 8, is there a way to handle this in Vaadin 13 and beyond?
Thanks.
We need to have an additional TextField added to the LoginForm. We can do this easily in Vaddin 8, is there a way to handle this in Vaadin 13 and beyond?
Thanks.
Currently <vaadin-login-form>
web component (used by LoginForm
in Vaadin 13+) is not very configurable. Afaik there’s no easy way to add extra components in the login form when using this component.
Here’s a related issue https://github.com/vaadin/vaadin-login/issues/96 (though this seems to be only about LoginOverlay). You might want to open a new feature request issue at https://github.com/vaadin/vaadin-login about related to what you would like to be able to do with the login form component.
If using Vaadin 13+ and you need more stuff in a login form, I think right now the best options is to either create your own login form component or a login view using several components together (e.g. TextField, PasswordField, Button).
The LoginForm component (and related <vaadin-login-form>
web component) is relatively simple. You might want to fork it to make your own version of it with the additions you need.
The source for the web component <vaadin-login-form>
is found here: https://github.com/vaadin/vaadin-login
And the source for the Java API (LoginForm
) for it is here: https://github.com/vaadin/vaadin-login-flow
Here’s a relevant part of docs if you want to try making a web component and associated Java API within a single project https://vaadin.com/docs/v13/flow/web-components/creating-an-in-project-web-component.html
Thanks for the update. Greatly appreciate it.
Some progress on this? This is really common case, should be definitely implemented as quick as possible.