Hi
I want to enable / disable the fields on metadata editor page. For example i should have 1 dropdown and 3 text boxes. If i select yes value from the first drop down then i have to hide or disable the 3 text boxes. If i select no then i should enable those again. Please help me to do this.
Solved! Go to Solution.
The link below covers your topic and many more with example code:
https://docs.adobe.com/docs/en/aem/6-0/develop/components/widgets.html
The link below covers your topic and many more with example code:
https://docs.adobe.com/docs/en/aem/6-0/develop/components/widgets.html
First of all thanks for your response. I gone through link and It is look like a classic UI or wcm part. But i am talking about coral UI. We will add / change the metadata nodes under metadata schema editor page ryt that one.
Views
Replies
Total Likes
Please check /libs/dam/gui/components/admin/propertiesform/clientlibs/propertieseditor/js/propertieseditor.js
Views
Replies
Total Likes
The mentioned above js getting called but what can we do with that.pls guide me. I am new to cq5.
Views
Replies
Total Likes
Well , you need to write logic in this js file for hide/show . Try something like below :
var yourFields = $('[name="./jcr:content/metadata/yourfiledname"]');
yourFields .each(function(index, value) {
var $value = $(value);
for(var i = 0; i< yourFields .length;i++){
$value.addClass('hide');
}
});
Views
Replies
Total Likes
thanks i will try this. Also please help me to write selection change function for the dropdown which is in the metadata properties page.
Views
Replies
Total Likes
See below my fields are like this. I have attached UI and html. Also I have tried with the above code you have provided. Here I am getting myFields as object. I am unable to read that. Also the alert "Inside" is not getting displayed(not going inside for each loop)
var myFields = $('[name="./jcr:content/metadata/myProperty"]');
alert(myFields);
myFields.each(function(index, value) {
alert("Inside");
var $value = $(value);
for(var i = 0; i< yourFields .length;i++){
$value.addClass('hide');
}
});
Please help me to do this.Thanks in advance.
Views
Replies
Total Likes