Installation and deployment
Version 7.x > Installation and deployment > data field repeater View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/3/2013 8:27:16 AM
   
data field repeater
I've made my own document type. There is a field "company name". There can be different count of these companies. How can I do that after filling the field "company name", there appear another one the same empty field?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/3/2013 9:17:18 AM
   
RE:data field repeater
Hello Pavel,

Do you mean you want to show some other field if the user writes something to the Company Name field during creating a document of such document type? If that is the case, you can achieve this functionality by setting Company name Has depending fields property to checked, "depending field" Depends on another field property to checked and Visible condition to CompanyName.Value.ToString() != "";.

If it is not exactly what you wanted, you have to describe your intentions in further details.

Best regards,
Filip Ligac

User avatar
Member
Member
pavel.1991-tut - 4/3/2013 9:57:16 AM
   
RE:data field repeater
I mean that there must be any field which can be repeated as many times as user wish. For example, there is the field "company name". If there be 10 companies names, I will have to create 10 fields and name them "company1", "company2" etc. But after some time, my boss will tell me that there must be 100 companies names, and I will have to create 90 more fields! How can create the field which will be like array. I mean that I will create only one field "company name", and user will be somehow repeat this field as many times as he wish, and in document type transformation I will have opportunity to work with this field like with array.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/4/2013 1:36:23 AM
   
RE:data field repeater
Hello Pavel,

I see your point but currently there is no way to achieve this functionality with built-in form controls. You will have to create your own custom form control where you will dynamically add new boxes (textboxes, listboxes, drop-down lists, etc.) and then concatenate values of those boxes into one string because all companies will have to be stored in one column of a database table since new columns cannot be dynamically added.

Further details about developing custom form controls can be found in Developer's Guide - Developing form controls.

Best regards,
Filip Ligac