/scripts/ahub.form.attachments.js
0

How to mandate a field and pre-populate in SAPUI5 XML view

Mar 02, 2017 at 05:03 AM

55

avatar image

I am trying to mandate a field and pre-populate value. This is what I am trying but the pre-populating with value CAM is not working ..please let me know what mistake I am doing.


<sap.ui.layout.form:label>

                      <Label class="sapUiSmallMarginTop"

                        text="{accountingInfoModel>name}" 

                        required="{= ${accountingInfoModel>name} === 'Att./Absence type' ? true : false }" 

                        valueStateText="{CAM}">

                        <layoutData>

                          <sap.ui.layout:ResponsiveFlowLayoutData

                            weight="1"></sap.ui.layout:ResponsiveFlowLayoutData>

                        </layoutData>

                      </Label>

                    </sap.ui.layout.form:label>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Mar 02, 2017 at 01:36 PM
0

Hi,

Use 'Name' property of input box to make it mandatory field along with 'Required' property of Label .

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content