cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Render input fields on SimpleForm dynamically, loop on input field

jmandap
Explorer
0 Likes
4,317

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.


Here is the form:
The blue box indicates the manually added input fields for personal data.
The yellow box is a sample question that I manually added, this is my problem, I cannot loop it with the same format of the form.
The red box is a sample, I tried using List to loop the questions, but as you can see it has a different rendering or layout.


I am a newbie of using SAPUI5 please help me.
Any possible solution would be accepted gratefully.
Thanks & Regards,
Jocel Mandap
View Entire Topic
0 Likes

You can use the below method

<List headerText="Text"  items="{path: '/Collection'}" >
    <CustomListItem>
        <HBox>
            <VBox  >
                <Link text="{Name}" target="{Url}" press="handlePress"/>
                <Label text="{Desc}"/>
            </VBox>
        </HBox>
    </CustomListItem>
</List>


jmandap
Explorer
0 Likes

Thanks Brian! I did use this but it is not align with the design of the form, this was rendered ul/li , I want it to be the same with the form, but thanks again! I will take note of this so that I can use it in the future