Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm wondering how can I create functionality of custom fields. Below I described what I want and solution which I consider.

Case study: Let’s assume that we have 2 roles: Admin and User. Admin has possibility to "add custom fields to forms". User can open that form in add/edit/read-only mode. In addition User can see a grid with columns from that custom fields.

Now I want to do following things as an admin: I add new textbox and this control should be available on add/edit/read-only view and value should be available in the grid(sorting functionality is required).

Below I place problems which I see to this feature:

  1. Where store form configuration – xml or custom tables for storing form view
  2. Where store results – xml or custom tables for storing results
  3. How to make grid with paging and sorting – If I’m going to use SQL Server then I will probably build some Views.
  4. How to build UI – I will use MVC and I think this is the easiest step.

Have you ever made something like this? Can you share with me some solution?

Thanks in advance.

share|improve this question
    
Are all the custom fields text, or will you support Boolean / dates / etc? Is there a limited number of custom fields, or will you leave it open? If leaving it open, will an Admin really create 40 of them? –  Dan Pichelman Apr 17 '13 at 14:44
    
Good question let's assume 4 types: Text(max 200 characters), checkbox(true/false), date and combobox(max 100 items). I think the client should be able to create max 15 fields. –  Adam Apr 17 '13 at 17:36
    
Based on this answer [link]stackoverflow.com/a/4403590/760494 I will keep configuration in xml file. Afterwards I will make some performance test and if everything will be alright then I will stay with this solution if not then I will search some other solution. –  Adam Apr 19 '13 at 5:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.