Don't know, if it is a typical problem, but can't figure how to realise it.
Application. It's relations:
return array( 'company_info' => array(self::HAS_ONE, 'AppCompany', 'applicant_id'), 'region'=>array( self::HAS_ONE,'AppRegion',array('company_region_id'=>'id'), 'through'=>'company_info' ), 'sector'=>array( self::HAS_ONE,'AppSector',array('company_sector_id'=>'id'), 'through'=>'company_info' ), );
return array( 'application' => array(self::BELONGS_TO, 'Application', 'applicant_id'), 'region' => array(self::BELONGS_TO, 'AppRegion', 'company_region_id'), 'sector' => array(self::BELONGS_TO, 'AppSector', 'company_sector_id'), 'goodsservices' => array(self::HAS_MANY, 'AppGoodsServices', 'company_id') );
return array( 'company'=>array(self::BELONGS_TO, 'AppCompany', 'company_id'), );
So, one user adds info about his company (company_name, date_of_registration etc), and than add some goods/services that this company produces. How to COLLECT, UPDATE AND VIEW all this information in one form? Is it possible?
How do I see this:
User addes some info and meets the field: "Goods and services and their percentage" and two fields - "GOODS AND SERVICES" and "PERCENTAGE" and ADD MORE button and he has 6 goods that he wants to add. So, he clicks on ADD MORE button and each time the new fields below appear. But the goods limit is 5, so the button becomes inactive after 5 fields have info.
And after SUBMIT button, all this info records to its table. It can be taken from table on UPDATE button and can be viewd in one CDetailView.
Please, how it can be implemented at least in general terms. **Thank you**