Search code examples
widgetslideraemxtype

How to display a tooltip with the value of a slider field in a Classic UI AEM dialog?


I use Slider xtype in dialog.xml

Is it possible to automatically display the value of this slider? for example - like a tooltip when the value changes

<slider
   jcr:primaryType="cq:Widget"
   fieldLabel="Tile Background Transparency"
   name="./slider"
   width="{Long}200"
   value="42"
   increment="1"
   minValue="0"
   maxValue="100"
   xtype="slider"/>

Solution

  • You can use the sliderfield xtype which provides this functionality.

    The useTips property allows to enforce the desired behaviour.

    <slider
        jcr:primaryType="cq:Widget"
        fieldLabel="Tile Background Transparency"
        name="./slider"
        width="{Long}200"
        value="42"
        increment="1"
        useTips="true"
        minValue="0"
        maxValue="100"
        xtype="sliderfield"/>
    

    AEM Classic UI sliderfield tips

    Check out the docs for more information.