Multifield in content fragment | Community
Skip to main content
July 12, 2023
Solved

Multifield in content fragment

  • July 12, 2023
  • 3 replies
  • 984 views

i need two types of fields in multified in CF, tried creating a multifield  component and linked to cf, in cf i can see multified but value are not storing after second field

 

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 BrianKasingli

Your question is not clear, but let's assume that you are trying to add a multifield feature to the "date and time" CF model component.

Before you start coding or anything, you'd need to do some investigation. Create a new CF model, and then author a "Single line text", out of the box CF model component, into your content fragment model... save it, and create a new CF. Edit the CF to include a single line of text. Next, take a careful look at the node structure in CRX/DE.
Moving next, go back into the CF model, and update the "render as" to "render as multi-field". Head back into your CF and add some some text using the multi-field UI. Immediately take a look at the CRX/DE; Take note of how additional nodes are generated when "render as multi-field" is selected. 

If you wish to enable date and time with "render as multi-field", you'd need to somehow work your magic to have the same node structure as the "Single line text" CF model component, "render as multi-field".

3 replies

Ankan_Ghosh
July 12, 2023

Hey @satishpothabathula ,

I am having a little hard time understanding the problem statement. Can you explain a bit more with screenshots?

Tanika02
July 12, 2023

Hello @satishpothabathula -

 

  • Confirm that the CF definition allows for the inclusion of multiple instances of the field. In the Content Fragment Models console, check the field's definition to ensure the cq:isMultiple property is set to true.
  • Make sure the data structure of the field in the multifield component matches the structure expected by the CF. Ensure that the field names and data types match between the multifield component and the CF definition.

 

If you have custom code or a custom submit handler, review the code responsible for processing and persisting the form data?

 

Regards,

Tanika 🙂

 

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
July 12, 2023

Your question is not clear, but let's assume that you are trying to add a multifield feature to the "date and time" CF model component.

Before you start coding or anything, you'd need to do some investigation. Create a new CF model, and then author a "Single line text", out of the box CF model component, into your content fragment model... save it, and create a new CF. Edit the CF to include a single line of text. Next, take a careful look at the node structure in CRX/DE.
Moving next, go back into the CF model, and update the "render as" to "render as multi-field". Head back into your CF and add some some text using the multi-field UI. Immediately take a look at the CRX/DE; Take note of how additional nodes are generated when "render as multi-field" is selected. 

If you wish to enable date and time with "render as multi-field", you'd need to somehow work your magic to have the same node structure as the "Single line text" CF model component, "render as multi-field".