Add multiple components on a single line while using FormLayout

I’m using a FormLayout to nicely position my fields on a data input form.
This works perfectly but now I want to add a component to the formlayout where I want to achieve the following on the same line:

Caption TextField LookupButton

The lookup button will open a new screen with a list of records where one need to be selected, the business key of the selection should appear in the text field.

What would be the cleanest way to handle this as I don’t see an immediate solution within the standard components.

You can simply add a HorizontalLayout as a FormLayout child component; all layouts are composable. Or CssLayout for a bit more lightweight solution.

Johannes,

Thanks for the quick response, but if I’m not mistaken the caption of the text field will be placed on top of the text field but I would like it on the left of the field. I added a screenshot of what I currently have, which is the result of your suggestion.

Is there an easy way to place the “user” caption left to the field?

Rgds

Kurt
17712.png

You’ll want to set the “User” caption on the wrapper layout, not the internal component.