I have a form as follows, and I have set the session on clicking next. Each type of house is with a different set of rooms. Say, if I click Independent, I get a list of rooms below. If I choose Villa/Duplex, a different set will pop out. In the Kitchen, bedroom, living room etc etc I have to enter how much of each do I want to customise. 2c46b7a860a59716fb0251225ec83e3d after clicking next I get the following page.
Initially, I had all the rooms in the first page. But later, I needed like, an independent house may have only a master bedroom, child bedroom, balcony etc etc. And a Villa/Duplex might have a different set of rooms. as you can see in the customised page. If I enter say, 2 in the master bedroom, and 3 in the living room, I need to get 3 of living rooms like in the second image, you only see one. I need to get how many I entered. As in like the categories, and the subcategories under them. Under exterior, I have a set of categories, under living room, I have a set of categories. I have clicked on exterior(the first by default it appears), and the following appear on the side, as in the subgroups under it, and the subsubgroups in it. How do I duplicate how many I need? Like 3 living rooms, means I need to repopulate 3 in the second form. I hope I explained it clear, is there an example or anything, I need help, I'm pretty new to CI.

Member Avatar

I haven't used CI in quite some time. But trying to get a grip of your needs.


State type of house -> changes the rooms available in the form (via js)
Enter the number of each type of room and submit


You could just save everything to a session (following validation) then go to the FORM 2


For each type of room with a number attached to it in your session array,
Output that number of each room in your sidebar [using an outer foreach loop for roomtypes and an inner for() loop for the number of those rooms]

You should name these sidebar items like Bedroom 1, Bedroom 2, etc - that can be done easily with the for() loop

Using CI, you'll be using OOP I suppose, so I imagine that you have a room class that spits out the subcategories for each room type (e.g. nameboard frame) and the underlying properties (e.g. woodwork) for each subcategory.

I don't think I have got it. but I have managed to insert in a single value of each, I'm not sure as to how, I'll try out something I have in mind, as in using a count. As form 1 is fine, as in I have managed to hide what I don't need using jQuery, and show the rest. Form 2 is confusing for me, is there an example of sorts?