How to Create Composite Multifield in Content Fragment without Custom JS | Community
Skip to main content
Nandheswara
Level 4
August 14, 2023
Solved

How to Create Composite Multifield in Content Fragment without Custom JS

  • August 14, 2023
  • 2 replies
  • 1557 views

Hi All,

 

I having a issue with content fragment composite multified, currently we having the composite multifield in a content fragment working with custom JS functionality, So this Multifield JS functionality is affecting the existing functionality in our project, Is it possible to create a composite multifield in content fragment like in the screenshot with out any Custom JS? If any one having any idea kindly let me know to solve this issue.

 

 

Thanks

Nandheswara

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

Hello @nandheswara 

 

The recommended approach from Adobe is to have Nested CF, rather than composite multifield.

Thus, the functionality isn't available OOTB. You would have to own and fix the customizations  for composite multifields.

 

If you are early in the project, please consider going Adobe route. It will provide you better results in terms of GraphQL queries as well

 

Adobe recommended way:

  • Add a Content Reference Multifield in the first content fragment model.
  • Create a 2nd content fragment model and required fields.
  • Reference the content fragments of second type from the first type

 

2 replies

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
August 14, 2023

Hello @nandheswara 

 

The recommended approach from Adobe is to have Nested CF, rather than composite multifield.

Thus, the functionality isn't available OOTB. You would have to own and fix the customizations  for composite multifields.

 

If you are early in the project, please consider going Adobe route. It will provide you better results in terms of GraphQL queries as well

 

Adobe recommended way:

  • Add a Content Reference Multifield in the first content fragment model.
  • Create a 2nd content fragment model and required fields.
  • Reference the content fragments of second type from the first type

 

Aanchal Sikka
Nandheswara
Level 4
August 14, 2023

Thanks for your Suggestion.

mahi1729
Level 4
August 14, 2023

Like @aanchal-sikka mentioned, if its in early stage go with Nested CF approach, as it allows querying the properties via GraphQL and probably is the reason Adobe may not have directly provided the composite multifield, since it requires its own schema or definition, leading to creation of a new cf model in CF world. But if you dont want to go that route and do not care about querying, and prefer to manage everything in 1 place, you can choose the free form JSON field, as you mentioned no custom JS. But you will end up having limitations like validating JSON if it meets your composite multifield definition. If you are willing to go with custom JS, there are options open. Thanks