0

I have the following tag in some cq5 dialog.xml:

<text jcr:primaryType="cq:Widget" fieldLabel="label" name="./text"
 maxLength="150" xtype="textfield"  value ="This text has to be displayed in the input field"/>

Now when I call the dialog, I expect to see the following: enter image description here

but the Inputfiled is empty :(

Any Idea?

Max_Salah
  • 2,407
  • 11
  • 39
  • 68

1 Answers1

2

Use defaultValue property:

<text
    jcr:primaryType="cq:Widget"
    fieldLabel="label"
    name="./text"
    maxLength="150"
    xtype="textfield"
    defaultValue="This text has to be displayed in the input field" />

More info can be found on the CQ5 Widgets API documentation.

Tomek Rękawek
  • 9,204
  • 2
  • 27
  • 43