Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Shaheena_Sheikh
Community profile Shaheena_Sheikh Level 2
Job title here
Location here
6 BADGES
Level 2

Level 2

Learn more
Joined the community 17-11-2020 9:21:18 PM
Offline
Top badges earned by Shaheena_Sheikh
Customize the badges you want to showcase on your profile
Re: Nested multifield loop
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I am only using the code for outer loop and I have a console log within the loop. I have a parent multifield item, and it has 2 child items. The console log is printing 3 times (1 parent + 2 child item). Even though the outer loop is for parent and should only run once.

Views

12

Likes

0

Replies

0
Nested multifield loop
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a nested multified and I need to loop through the inner multifield items also. For outer multifield I was using :$(".coral3-Multifield-item").each(function( index ) {//body}

Views

78

Likes

0

Replies

3
Re: Fetch checkbox value (from within multifield)
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a similar issue with ADD button of multifield. I want to trigger a function when Add button is hit. It was working fine until i had only simple multifield. When i created a nested multifield, if i hit the inner Add button, even then my function gets triggered by the code: $(document).on("click", "button[coral-multifield-add]", function() {}). I want the function to trigger only when i it the outside add button

Views

69

Likes

0

Replies

0
Re: Fetch checkbox value (from within multifield)
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
what is eq(0)?

Views

82

Likes

0

Replies

0
Fetch checkbox value (from within multifield)
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I need to fetch value of a checkbox which is present in multifield. There is another checkbox and both the checkboxes are having same granite:class. So I am unable to use granite:class to fetch the value of the checkbox. What else ways are possible to fetch the value of the first checkbox?Cant use this: let ctaDropdown = $(this).find(".cq-dialog-checkbox-showhide")[0].selectedItem.value;since my other checkbox is also having same class (cq-dialog-checkbox-showhide)

Views

112

Likes

0

Replies

4
unable to fetch dropdown value correctly
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a component in which i have a multifield item. In each multifield item i have separate containers. In of the containers i have a dropdown. I am trying to fetch the selected value of the dropdown, but i am only getting select as the value with the below code. Whereas if use this code in other components having multifield and dropdown directly as an item in the multifield then i am getting the correct value.My component1-->Tab(Data)-->multifield item1-->container(list)-->container(button)--...

Views

97

Likes

0

Replies

3
Re: Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
thanks, it works!

Views

84

Likes

0

Replies

0
Re: Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
if i add a loop in place of login, the loop never works for the newly added item. $(".coral3-Multifield-item").each(function (index) {console.log("add item");})

Views

74

Likes

0

Replies

0
Re: Loop not working for multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
the above code triggers the console even if i click on a dropdown within multifield, whereas it should trigger only for Add button of multifield. Though the loop issue gets resolved using the above code.

Views

87

Likes

0

Replies

0
Re: Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
this works but has a problem. The alert gets kicked even if i click on a dropdown, colorfield swatch (these are also within multifield items) etc. that should only get triggered for the click event of Add button

Views

102

Likes

0

Replies

0
Re: Loop not working for multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
This is more of a validation. I am doing something like this : https://adapttoaem.blogspot.com/2021/02/setting-dynamic-dropdownselect-value-in.html but only difference is that im using colorfield instead of dropdown in a multifield. So using the above code in JS, when i add a new item to the multifield, a new colorfield is present inside the new item and I need to a run a loop over all the existing items + the new item

Views

86

Likes

0

Replies

0
Loop not working for multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
$(".coral3-Multifield-item").each(function( index ) {}this loop is not working for the newly added items. $("coral-multifield").children("button[coral-multifield-add]").on("click", function() { $(".coral3-Multifield-item").each(function( index ) { console.log("add item"); })});if I already have 2 items in my multifield when I open the dialog, then the above console log prints 2 times. Now if I Add a new item to the multifield (3rd item), the console log still works for the first 2 items only, th...

Views

141

Likes

0

Replies

5
Re: Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
thanks, it works!

Views

103

Likes

0

Replies

0
Re: Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
my func is getting triggered when i am opening the dialog. Not when i click on the Add button

Views

104

Like

1

Replies

0
Check if new item is added to the multifield
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I want to call a JS function when a new item is added to the multifield. I have tried: $(".cq-dialog").find("coral3-Button coral3-Button--secondary").on("click", funcName);doesn't call my function.

Views

193

Likes

0

Replies

9
Re: Granite:id to granite:class
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
i was referring to https://adapttoaem.blogspot.com/2021/02/setting-dynamic-dropdownselect-value-in.html in here, the only difference is that in my case the colorfield is inside a multifield

Views

93

Likes

0

Replies

0
Re: Granite:id to granite:class
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
i pasted the complete function for better understanding. And the first code is not having any multifield

Views

112

Likes

0

Replies

0
Re: Granite:id to granite:class
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
my font-field is within multifield

Views

120

Likes

0

Replies

0
Re: Granite:id to granite:class
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
Parathesis are all in place in my actual code, pasted it wrong here. Console error: Cannot read property 'clear' of undefined for the line where optionItems are getting cleared.

Views

116

Likes

0

Replies

0
Granite:id to granite:class
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
If I replace: const setOptions = function () {let fontField = $(".cq-dialog").find("#fontField ")[0];let optionItems = fontField.items;optionItems.clear();for (var i = 0; i < 1; i++) {let obj = new Object();let cnt = new Object();obj["value"] = "#ffffff";cnt["textContent"] = "white";obj["content"] = cnt;optionItems.add(obj);}};with:const setOptions = function () {$(".coral3-Multifield-item").each(function( index ) {let fontField = $(this).find(".fontField ");var arah=["#ffffff","#000000",""];var...

Views

189

Likes

0

Replies

9
Re: Disabling a field in dialog
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
Yes, I am using JS to make my field readOnly. Thanks for the info.

Views

104

Likes

0

Replies

0
Re: Disabling a field in dialog
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
thanks! fontField.readOnly=true; works

Views

124

Likes

0

Replies

0
Re: Disabling a field in dialog
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I updated 'let' to 'var' and it's still the same 😞

Views

85

Likes

0

Replies

0
Disabling a field in dialog
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have the below code:let fontField = $(".cq-dialog").find("#contentColor")[0];fontField.value="#ffffff";fontField.disabled=true; the colorfield shows #ffffff and as disabled. But after closing the dialog, I don't see the color of the font as white (#ffffff). If I comment the line of code having disabled, the color starts reflecting. If i comment the third line of code, the value for the colorfield gets stored in the node but if I don't comment the third line then the value doesn't get stored at...

Views

157

Likes

0

Replies

6
Re: ID for a field in multified
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
so, if I have 4 multifield items how can i get the data for each textfield in each item?

Views

146

Likes

0

Replies

0
ID for a field in multified
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a textfield within a multified. I need to fetch the ID for the textfield each item a new multified item is added. Since the textfield is within the multified I am not sure how can i set the granite:id to it. Any suggestion?

Views

192

Likes

0

Replies

5
loading clientlib for dialog
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a clientlib with 3-4 js files in it in a component. I wanted 1 of those JS files to load for my dialog. I cant use extraClientlibs because that way all the JS will load for my dialog, whereas I specifically want only 1 particular file to load for my dialog. Is there a way to do this?

Views

178

Likes

0

Replies

4
Refresh page after editing component
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
I have a component with various fields in it along with image field. I want to refresh the page only when the image field is update. Right now I'm using edit:config to refresh page "afteredit". How can I refresh the page only when the image field is edited?

Views

207

Likes

0

Replies

5
Re: Add field description property dynamically to the dia...
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
thanks for the solution. I too found another way of dealing with it. I am removing/adding the ID everytime theres a validation to keep only a single alert.

Views

160

Likes

0

Replies

0
Re: Add field description property dynamically to the dia...
Avatar
Validate 10
Level 2
Shaheena_Sheikh
Level 2

Like

1 like

Total Posts

87 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Give Back
Boost 1
Applaud 5
View profile
Shaheena_Sheikh
- Adobe Experience Manager
updated the code snippet and the problem statement.

Views

173

Likes

0

Replies

0