Add event handler on pathfield widget on dialog AEM6.3 | Community
Skip to main content
Level 2
December 22, 2017
Question

Add event handler on pathfield widget on dialog AEM6.3

  • December 22, 2017
  • 0 replies
  • 1623 views

Hey Guys,

I have been trying to capture select event on pathfield on TouchUI dialog, to populate next widget(textfield) based on the value selected in pathfield.

I tried with adding class attribute on pathfield , and capturing the event on('change:value').

I think this works well for with 'select' widget (dropdown) and for pathfiel its does not seems working.

    var ASSET_PATH_CLASS = ".cq-dialog-asset-path";

    $( document ).on("foundation-contentloaded", function(e) {

     

        $( ASSET_PATH_CLASS ).on('change:value', function(event, payload) {

    var $form =  el.closest("form.foundation-form");

            var $selected = $form.find(ASSET_PATH_CLASS);

          getJsonData($selected.val(), $form);

        });

    });

Can you correct me if I'm trying to capture correct event.?Or if anybody has implemented event on pathfield in granite.

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