Custom Multifield is not working In AEM 6.3 | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Jun 13, 2017 5:36 PM UTC

In 6.3, there need to be an update - I have let the team know there is an issue.

37 replies

Level 2
Mar 20, 2018 9:04 PM UTC

In case of a switch I tried setting a custom value but still no luck. I have created another thread since boolean type issue.

AEM 6.3 Multifield not able to support boolean type resource

Its setting the custom set value to all of them. I would expect it to be something like this :

{"firstTitle":"T1", "sale":"enable"}

{"firstTitle":"T2", "sale":" "}

{"firstTitle":"T3", "sale":"enable"}

Translate
smacdonald2008
Level 10
Mar 20, 2018 8:02 PM UTC

How are you reading this value - are you using Sling Model?

Translate
Level 5
Mar 20, 2018 7:51 PM UTC

if you define as checkbox, add uncheckedValue there. See an example below.

<hide_image

                        jcr:primaryType="nt:unstructured"

                        sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"

                        fieldDescription="This checkbox"

                        name="./hideImage"

                        text="Hide Image"

                        uncheckedValue="false"

                        checked="${not empty cqDesign.hideImage ? cqDesign.hideImage : false}"

                        value="true"/>

Translate
Level 2
Mar 20, 2018 4:15 PM UTC

Hi smacdonald2008​, There seems to be an issue with the multifield from both '/libs/granite/ui/components/foundation/form/multifield' and also from '/libs/granite/ui/components/coral/foundation/form/multifield' in handling boolean types.

If I use a 'switch' or a 'checkbox' inside the multifield then the value it takes is always true. I tried with different variations but it doesn't work at all.

Attached images of implementation.

Added the multifield.

Added the boolean type switch

This is the dialog.

Adding values to the dialog. 1st is true, 2nd false and 3rd is true.

It stores everything as true :/

Any idea what could be causing this ?

Translate
smacdonald2008
Level 10
Dec 21, 2017 7:19 PM UTC

Update on use of MULTIFIELD IN AEM 6.3. Use Granite/Coral as mentioned here:

Creating a Granite/Coral 6.3 Multifield HTL component for Adobe Experience Manager

Translate
Aparna_Sunkari
New Participant
Dec 21, 2017 6:56 PM UTC

Its not working with this structure also

Translate
Level 2
Oct 26, 2017 3:29 PM UTC

Thanks smacdonald2008​ and Ratna Kumar​.

Issue is resolved now after installing the instance once again and deploying the helpx article.

Translate
smacdonald2008
Level 10
Oct 16, 2017 4:41 PM UTC

This means you still have a JS script on your AEM instance that is using the Multifield script. As a test, place the package from the HELPX article on a fresh instance. You will see it working.

Translate
Level 2
Oct 15, 2017 11:16 AM UTC

Hi Ratna,

I have tried these steps , still issue persist with the package I installed from helpx site, ,

I have ACSpackage (3.9)and component package, no multifield js file but still gets the below error,

all.js:7015 Uncaught RangeError: Maximum call stack size exceeded

    at instanceGenerator._addListeners (all.js:7015)

(./libs/cq/gui/components/authoring/dialog/clientlibs/all.js ) --> relative path of the out of the box JS file

Multifiled component package that i installed is from below location,

Creating an AEM HTML Template Language 6.3 component that uses a Multifield

Thanks,

Nandhini

Translate
Ratna_Kumar
Level 10
Oct 15, 2017 10:16 AM UTC

Hi Nandini,

Make sure you have only one multifield.js file..If you install ACS Commons package then no need to have multifield.js file.

Start the fresh instance, install ACS Commons package, component package and check again.

Also pls clear the browser cache to see the changes.

Hope this helps!!

~Ratna.

Translate