Skip to main content
Level 2
August 31, 2023
Solved

While authoring nested multifield if I add new field then cursor is moving back to the main field instead of next field. What can be done to avoid this. Can anyone please help.

Sharing .content.xml file associated with my sample nested multifield component
 
<?xml version="1.0" encoding="UTF-8"?>
    jcr:primaryType="nt:unstructured"
    jcr:title="Dynamic Image Cards"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.authoring.editor.dynamicimages]">
    <content
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/coral/foundation/tabs">
                <items jcr:primaryType="nt:unstructured">
                    <settings
                        jcr:primaryType="nt:unstructured"
                        jcr:title="Promotional Card Settings"
                        sling:resourceType="granite/ui/components/coral/foundation/container">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <carouselImageEditor
                                        jcr:primaryType="nt:unstructured"
                                        jcr:title="Add Image Tile Group"
                                        sling:resourceType="granite/ui/components/coral/foundation/container">
                                        <items jcr:primaryType="nt:unstructured">
                                            <column
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                                <items jcr:primaryType="nt:unstructured">
                                                    <fieldset
                                                        jcr:primaryType="nt:unstructured"
                                                        jcr:title="Add Image Tile Group"
                                                        sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
                                                        <items jcr:primaryType="nt:unstructured">
                                                            <column
                                                                jcr:primaryType="nt:unstructured"
                                                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                                                <items jcr:primaryType="nt:unstructured">
                                                                    <carouselImagegroup
                                                                        jcr:primaryType="nt:unstructured"
                                                                        sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                                                                        class="full-width"
                                                                        composite="{Boolean}true"
                                                                        fieldDescription="Click '+' to add a Image Tile Group">
                                                                        <field
                                                                            jcr:primaryType="nt:unstructured"
                                                                            sling:resourceType="granite/ui/components/coral/foundation/container"
                                                                            name="./carouselImagegroup">
                                                                            <items jcr:primaryType="nt:unstructured">
                                                                                <carouselImage
                                                                                    jcr:primaryType="nt:unstructured"
                                                                                    sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                                                                                    class="full-width"
                                                                                    composite="{Boolean}true"
                                                                                    fieldDescription="Click '+' to add a Promotion Card"
                                                                                    fieldLabel="Add Promotional Card">
                                                                                    <field
                                                                                        jcr:primaryType="nt:unstructured"
                                                                                        sling:resourceType="granite/ui/components/coral/foundation/container"
                                                                                        name="./carouselImage">
                                                                                        <items jcr:primaryType="nt:unstructured">
                                                                                            <image
                                                                                                jcr:primaryType="nt:unstructured"
                                                                                                sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
                                                                                                allowUpload="false"
                                                                                                autoStart="{Boolean}false"
                                                                                                class="cq-droptarget"
                                                                                                fieldDescription="Choose Background Image"
                                                                                                fieldLabel="Choose Background Image"
                                                                                                fileNameParameter="./image"
                                                                                                fileReferenceParameter="./imageRef"
                                                                                                mimeTypes="[image]"
                                                                                                multiple="{Boolean}false"
                                                                                                name="./image"
                                                                                                rootPath="/content/dam"
                                                                                                title="Background Image"
                                                                                                uploadUrl="${suffix.path}"
                                                                                                useHTML5="{Boolean}true"/>
                                                                                            <imageAltText
                                                                                                jcr:primaryType="nt:unstructured"
                                                                                                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                                                                                fieldDescription="Image Alt Text"
                                                                                                fieldLabel="Image Alt Text"
                                                                                                name="./imageAltText"/>
                                                                                        </items>
                                                                                    </field>
                                                                                </carouselImage>
                                                                            </items>
                                                                        </field>
                                                                    </carouselImagegroup>
                                                                </items>
                                                            </column>
                                                        </items>
                                                    </fieldset>
                                                </items>
                                            </column>
                                        </items>
                                    </carouselImageEditor>
                                </items>
                            </column>
                        </items>
                    </settings>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sady_Rifat
Sady_RifatAccepted solution
Community Advisor
August 31, 2023

Hello @vanitana ,

I tried to run your code. Everything seems normal to me. Let me know if you are expecting anything else,

 

 

1 reply

Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
August 31, 2023

Hello @vanitana ,

I tried to run your code. Everything seems normal to me. Let me know if you are expecting anything else,

 

 

Translate