Access cq:dialog component properties in js | Community
Skip to main content
Sanjay_Bangar
Community Advisor
Community Advisor
October 22, 2021
Solved

Access cq:dialog component properties in js

  • October 22, 2021
  • 3 replies
  • 1184 views

Hi,

     How can we access component cq:dialog properties(name, description) using simple client side  js   .

Using server side js we can able to access easily.

Regards,

Sanjay

        

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sanjay_Bangar

Hi ,

     I tried below and it is working for me.

var titleFromDialog = $(".button-link").val();
console.log(titleFromDialog)

 

3 replies

Ankur_Khare
Community Advisor
Community Advisor
October 22, 2021

Read the properties in component.html using sightly and keep them as hidden fields and then access in ur js file.

Kiran_Vedantam
Community Advisor
Community Advisor
October 22, 2021
Sanjay_Bangar
Community Advisor
Sanjay_BangarCommunity AdvisorAuthorAccepted solution
Community Advisor
October 22, 2021

Hi ,

     I tried below and it is working for me.

var titleFromDialog = $(".button-link").val();
console.log(titleFromDialog)