Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Recurring fields in the edit screen

Vote:
 

Hi,

I would like to be able to add multiple instances of the same field for a page. So, it should be possible to add multiple textfields (1 to x) to an included picture. I've seen the link collection, and was wondering if something similar could be done for text.

Thanks in advance

 

Gr,

Erol

#25188
Oct 14, 2008 19:27
Vote:
 

Hi Michel!

Yes, you could do a similar thing for multiple text fields but you would have to do some custom logic yourself. Create a custom property and property control. The property control needs to convert the multiple strings to either a single string with some separator (like comma) or xml. There is a class, EPiServer.Core.PropertyMultipleValue,  that you might inherit from to do some of this for you.

The next thing you have to do is the PropertyDataControl that does the presentation logic for the property (both edit and view mode). If your not familiar with the property concept in EPiServer CMS 5 there is a video that explains some of the possibilities here: http://world.episerver.com/en/Video/DevSummit/Custom-Property-Types-in-EPiServer-CMS-5-/

You need to do your own custom logic to add and remove items by adding post backs or ajax/javascript.

Regards
Linus Ekström
EPiServer Development Team

#25477
Oct 28, 2008 2:12
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.