Unable to Delete Tag Selection from Content Fragment Model

Avatar

Avatar
Level 1
AEMRand
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
AEMRand
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
View profile
AEMRand
Level 1

31-08-2020

Hello, 

I am relatively new to AEM development but having an issue with the OOTB tagfield. We are using AEM 6.4. 

 

I have a content fragment model with a defined element as: 

 

 <_x0031_597436678283
                            jcr:primaryType="nt:unstructured"
                         sling:resourceType="cq/gui/components/coral/common/form/tagfield"
                            fieldLabel="Platforms"
                            forceSelection="true"
                            listOrder="23"
                            metaType="tags"
                            multiple="true"
                            name="platforms"
                            renderReadOnly="false"
                            rootPath="/content/cq:tags/Platforms"
                            showEmptyInReadOnly="true"
                            valueType="string[]"/>

 

Leveraging the tags, I can select as many options as I want as defined in the tag. Once added, I can only remove tags as long as at least one tag is still selected; I cant remove them all. 

 

IE. If I select A, B, and C from the tagPicker. Save. When I go to modify, if I try to remove all three and save, no update is made. If I try to remove two of the options, it will save just fine. However, after removing the two, I can never remove the final one (it wont save.) 

 

Is there a way to get around this? Not exactly sure what I am missing. 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

572 likes

Total Posts

716 posts

Correct reply

238 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

572 likes

Total Posts

716 posts

Correct reply

238 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

01-09-2020

Hi @AEMRand,

Can you try to make forceSelection -> "false" instead of removing it. 

In 6.5, we have "required" property with value "on" if has to be mandatory and no other property(in particular forceSelection) related to mandate the selection.

Per the XML (from 6.4) shared in the post, I couldn't see the property "required". So try the above and let know if it help solves the issue.

 

Remove forceSelection property and add "required" property of "String" type with value -> "off

If you don't see progress, share the screenshot of your CFM with tagfield's Properties view(editor view) and CFM as a package if possible.

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile
SundeepKatepally
Level 4

31-08-2020

remove the mandatory validation on that field, Then it will start working.