![]() |
Form Generator - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Form Generator (/showthread.php?tid=42458) |
Form Generator - El Forum - 06-08-2011 [eluser]Seller[/eluser] Hello. Apologize for my bad English. I am developing a site on the similarity http://www.alibaba.com/. On this website when placing a new ad., depending on the selected subcategory dynamically generated form with the characteristics of the selected categories. For example, if a person has chosen a category Computer Hardware & Software and subcategory Laptops, then for this subcategory is generated form with features for Laptops. Just these characteristics are associated with the search product, such as a person has entered into a search form Laptops, then on the search page appears characteristic of this section as filters to refine your search. I made 4 of the table to store the fields. First table fields (id, title, type) the second fields_values (field_id, good_id, value) third fields_groups (id, title) and the fourth table in which we write what fields belong to which group fields_in_group (group_id, field_id ) and to each category of the directory I can attach some group of fields. But I have a problem now. How can I store the values for option and bind them to a select field? I have thought that if we make another table to store values and the option to link this table on the ID of the table fields. Please, tell me! Am I in right direction think? Form Generator - El Forum - 06-08-2011 [eluser]adityamenon[/eluser] That's pretty deep. I understood your problem, but can you post a diagram of your MySQL schema here? That would help me understand your solution better; and suggest any improvements if necessary. Form Generator - El Forum - 06-09-2011 [eluser]Seller[/eluser] [quote author="adityamenon" date="1307604429"]That's pretty deep. I understood your problem, but can you post a diagram of your MySQL schema here? That would help me understand your solution better; and suggest any improvements if necessary.[/quote] The scheme of my tables. Graphic diagram in the attachment Code: table `fields` Form Generator - El Forum - 06-10-2011 [eluser]Seller[/eluser] Hello. Maybe I do not quite understand explained to me what my problem now. Try again. The database will store all possible form fields for each category of goods. But I can not figure out how to store a database "<select>" and "<option>" (dropdown list). Please help very urgently need a solution. |