selvakumar
(Selvakumar Kaliyappan)
1
Hi, I have created the table format like as follows:
lookup table:
[xml]---------------------------------------
|id | type | code | value |
|1 | 1 | PP | profile_pic |
|2 | 2 | PRP | product_pic |
|3 | 3 | GP | gallery_pic |
|4 | 4 | FP | forum_pic |
[/xml]
gallery table:
[xml]-------------------------------------
|id | user_id | type | image |
|1 | 1 | 1 | 1.jpg |
|2 | 1 | 2 | new.jpg |
|3 | 1 | 2 | images.jpg |
|3 | 2 | 4 | 2435.jpg |
-------------------------------------[/xml]
And, now what I want to do is: in my form I want to add the above field in the single form.
So, I want to know, how to pass the field type in the form page? Or whether I have to do anything in the model or controller?
Please help me 
richmest
(Richard Mestetsky)
2
You probably want to use a dropdown list for the gallery table providing the options of the lookup table.
You can use Example 4 for the dropdown list at http://www.yiiframework.com/wiki/48/by-example-chtml#hh5.
selvakumar
(Selvakumar Kaliyappan)
3
in the form there is no dropdown needed sir. i want to pass the type with the fileField.?