Hi Experts,
I have pathfield with picker= /mnt/overlay/dam/cfm/admin/content/v2/associated-content/assetpicker.html?root=/content/dam&mode=single&filter=nosystem for selecting path for image.
We have Alt Text field as well for the image, so requirment is to auto fill alt text field with meta description of the selected image. something similar already exists in OOTB image cmp but not able to reuse it as our component dialog structure involves multiple tabs with multiple pathfields selectors in each tab.
can you please give some direction here.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Make an ajax request to assets metadata node on change to get metadata
$('pathfield-selector').on('change', function(){
$.get(assetsPath + /metadata.1.json, function( data ) {
//set descript inout from dc:description
}
})
@arunpatidar @SantoshSai @Sachin_Arora_ @lukasz-m need your input here. Please do respond.
Make an ajax request to assets metadata node on change to get metadata
$('pathfield-selector').on('change', function(){
$.get(assetsPath + /metadata.1.json, function( data ) {
//set descript inout from dc:description
}
})
Thanks for the reply @arunpatidar
but It is not working for pathfield.
on change function is not working for pathfiled but it works for normal text field .
Becuase in normal text field , input tag has value attribute but for pathfiled .
Input is not having any vlaue tag , I can see the value is there in down below inside coral-taglist.
like below:
<coral-taglist>
<coral-tag>
<coral-tag-label></coral-tag-label>
<input type="hidden" handle="input" name="./asset" value="xyz">
</coral-tag>
</coral-taglist>
Views
Replies
Total Likes
Why are you using tag fields? instead of normal input field?
You setup pathfield as multi-select, change it to 1.
Views
Replies
Total Likes
not understanding , I am not using any tag fields,
I am just using pathfiled with pickerSrc
and how to set up pathfiled as multi-select and change it to 1?
I can see multiple boolean proeprty for pathfield.
Views
Replies
Total Likes
If multiple boolean property is not set then pathfield will be single.
Try with below code
$('.coral-Form-field.mycustomclass').on("change", function(){ console.log('Hello'); })
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies