Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Form is not displayed on page....


i am trying to display simple form on web page but getting error "Message: "undefined" is not valid for aggregation "content" of Element sap.ui.layout.form.SimpleForm#__form0" i was unable to find error in my code.

var oForm = new sap.ui.layout.form.SimpleForm(



  maxContainerCols: 2,

  editable: true,

  content: [

         new sap.ui.commons.Label("lb1",{text:"name"}),

         new sap.ui.commons.Label("lb2",{text:"Name"}),

         new sap.ui.commons.TextField("tx1",{value:"Max"}),




thank you.

Former Member

Try to copy-pase the SAPUI5 code from the JSBIN into your <script> tag instead of your code and see if it works.

I don't understand why do you place an empty view into "content" tag (why did you define it in the first place?).

Then, you place your form into "content2" tag which does not exist in your html part.

As you can see from the JSBIN example, the "clean" code of the form declaration works fine.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question