Search code examples
javascriptaem

How to retrive the tag value entered in dialog in aem in javascript?


I need to get the value of the tag entered in dialog.

The sling:reosurcetype is cq/gui/components/coral/common/form/tagfield

I have tried using a graniteClass getting the value something like $(".tagid")[0].value where tagid is the graniteclass name but this doesn't seem to me working.

I need to get the data in this screenshot iin javascript in aem


Solution

  • Graniteclass worked

    var tags = $this.find("[data-id='tagi'").find("input").val(); where tagi is the id name of the graniteclass