How to arrange two input fields side by side
-
4 years, 6 months ago #24181
Hi,
I use the ui_layout_form_SimpleForm1 to create a floating form. But I want to have two input fields next to each other in some places (please see the example in attachement). I have tried the following: Set the width (dimension) of Label1 + Input1 to 30% and the width (dimension) of Label2 + Input2 to 70% but the inputs are not placed side by side and I don’t know how to do that. (I set the dimension of the layout itself to 50% and maxContainerCols = 0)
I would be glad about a help.
Fulya
Attachments:
You must be logged in to view attached files.Jennifer Häfner
ModeratorHas successfully completed the online course Intermediate (200)
Has successfully completed the online course Advanced (300)
Has successfully completed the online course Basics (100)
Has successfully completed the online course Advanced (310)
Has successfully completed the online course Advanced (320)
Has successfully completed the Intermediate Certification
Has successfully completed the Advanced Certification
4 years, 6 months ago #24295::Hi Fulya,
in a SimpleForm, a Label always starts a new line. So if you want to have two input fields next to each other, you can implement your SimpleForm like in this example: https://sapui5.hana.ondemand.com/#/entity/sap.ui.layout.form.SimpleForm/sample/sap.ui.layout.sample.SimpleFormToolbar
Or you can set the SimpleForm’s property ‘layout’ to ‘ColumnLayout’, so all labels/inputs are arranged in columns (implemented in this example: https://sapui5.hana.ondemand.com/#/entity/sap.ui.layout.form.SimpleForm/sample/sap.ui.layout.sample.SimpleForm_Column_oneGroup234)
You must be logged in to reply to this topic.