Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Create custom data type in Content Fragment which can select multiple values from drop-down

Avatar

Level 1

Hi Team,

I am having a requirement, such that I should be able to select multiple values from a drop-down in Content fragments in AEM.

I tied as is from this blog, but was unsuccessful :
https://blogs.perficient.com/2021/05/27/how-to-extend-content-fragment-model-data-types/  

Can you look at the blog and say, if anything is missing from the post. Or can you give any recommendations / solutions.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Sampathkg : Can you please share what's not working after you have tried as per the blog article?

Alternatively, what is your exact use-case. Would it be possible to use 'Checkboxes' from Enumeration, with that you can select multiple values by means of selecting multiple checkboxes. With that you will not have to modify anything as well.

Please let me know if alternative approach could be feasible for your use-case or share the detailed use-case.

thanks.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

@Sampathkg : Can you please share what's not working after you have tried as per the blog article?

Alternatively, what is your exact use-case. Would it be possible to use 'Checkboxes' from Enumeration, with that you can select multiple values by means of selecting multiple checkboxes. With that you will not have to modify anything as well.

Please let me know if alternative approach could be feasible for your use-case or share the detailed use-case.

thanks.

Avatar

Level 1

Hello @Kamal_Kishor / @Raja_Reddy / @kautuk_sahni :

Use case : I want to select multiple values from a drop-down in a Content Fragment. So I am trying to add a custom data-type in my Content Fragment. I am attachinga doc which has info about all the steps I followed with reference to this doc, but was unsuccessful : https://blogs.perficient.com/2021/05/27/how-to-extend-content-fragment-model-data-types/

 

Here is the doc which has screen-shots of what I did in my local. 

Avatar

Community Advisor

Hi @Sampathkg 

  1. Double-check that you have followed all the steps in the blog post correctly. Make sure that you have created the custom data type, added it to the Content Fragment Model, and updated the corresponding Content Fragment Template.

  2. Check the AEM error logs to see if there are any errors related to your custom data type. This might give you a clue as to what is going wrong.

  3. If you are still unable to select multiple values from the drop-down, you might want to consider using a different approach. For example, you could create a custom multifield component that allows users to add multiple values. You could then include this multifield component in your Content Fragment Template.



Avatar

Administrator

@Sampathkg Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni