on ‎2021 Sep 23 11:33 AM
Hi Experts,
I am having trouble on rendering question list data with yes or no radio field or switch field on my Form, data are coming from OData service. So the input fields that I need are in the service, my problem is how can I render it on simpleForm, other personal information are manually added on simpleForm , below the form I need to render the questions, but the problem is I don't know how to loop it, I tried using List but it affects the responsiveness and layout of the form.

Request clarification before answering.
Also, if you want to dynamically add content - you can do that in your view controller.
I tried using the below code in my dev space, and it adds with proper alignment.
You will get more flexibility with your data by doing this programmatically.
var oForm = this.getView().byId('<Your_Form_ID>');
for (let index = 0; index < arr.length; index++) {
oForm.addContent( new sap.m.Label({ text: arr[index] }) );
oForm.addContent( new sap.m.Input({ type: sap.m.InputType.Text, placeHolder: "Some Text" }) );
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.