Skip to Content

SAPui5 : change design of a label in a formelement

hello,

I am unable to change the design to for example to Bold for the labels of my formelements in my form, the 3rd line in the code below

<f:FormContainer binding="{GETPLANT>/S_T001WSet('03')}">
  <f:formElements>
    <f:FormElement label="Warehouse Number">
      <f:fields>
	<Text text="{GETPLANT>DC}"/>
      </f:fields>
    </f:FormElement>
  </f:formElements>
</f:FormContainer>

but with ui5 inspector, it is possible to change the design of the label :

So there must be a way to do it, any idea?

untitled.png (7.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 22, 2017 at 04:52 AM

    Hello,
    Did you follow this blog, it should answer your question.

    Regards,

    Joseph

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2017 at 01:28 PM

    Hello,

    I already use some custom CSS in my projects, the problem here is, the label is an attribute of the formelement, it is not a label on it's own,

    so this:

    <f:FormElement label="Warehouse Number" class="myclass">

    will apply a css to the formelement, not the label, i need something like

    <f:FormElement label="{text:'Warehouse Number',design:'Bold'}">

    but this is not working

    Add comment
    10|10000 characters needed characters exceeded