Adding preview option in cq:dialog



Is it possible to add a session in cq:dialog which renders whatever data is supplied in the fields and previews it out in real time. In the simplest of scenarios, I need to add two numbers and when I enter both the numbers the cq:dialog should preview it's output as 4. There should be two sessions in the the cq:dialog, like two columns, the left one to enter value to the fields and the right to display the rendered output. How to achieve this? Is it possible to?

Accepted Solutions (1)

Accepted Solutions (1)




No it can't be possible through Touch UI dialog. Also, as per the spec​​ Sightly does not support operations inside expressions. You would need to create a helper use-object (using either JavaScript or Java) that would provide the test threshold/reference value.

Answers (1)

Answers (1)




Hi jezwn​,

  • use extraclientlib property to add your dialog specific clientlibs.
  • write your logic in clientlib js.

Take a reference from this GitHub - Adobe-Marketing-Cloud/aem-authoring-dialog-fields-customization: Sample for customizing fie...

Usually we write JS for fields validations in a dialog.However I never came across such kind of requirements but it should be achievable using above steps.


Arpit Varshney