Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to create form?
Hi All,
I need to create a form in vaadin with some hidden input types and target element.
It is something like this:
<form target="_blank" action="https://abcs.xyz.pqr/use/login.aspx" method="post">
<input type="hidden" value="xxxdddeeeeddddd=" name="token">
<input type="hidden" value="ASDF" name="tAuth">
<input type="hidden" value="2012-01" name="sDate">
<input type="submit" value="Launch!" />
</form>
Here https://abcs.xyz.pqr/use/login.aspx is an external url.
Can anyone tell me how to achieve this in vaadin?
Regards,
LP
You can use the CustomLayout and put your html in that layout
If you want to submit a form with some POST data to another service, you may find the FormSender Add-on useful.
If GET is sufficient, it should be easy to do with window.open().
You could also do as Danny suggested. You can also use Label in HTML mode instead of CustomLayout. Then you just need to make a window.executeJavaScript() call to "click" the submit button in the form.