I am working on YII framework, and i am a newbie. I have user register form as shown below:
Address: [Text area]
User Loan Type: (Checkbox list as below)
Loan Type 1 Loan Type 2 Loan Type 3 Loan Type 4 Loan Type 5
Now i have 3 models:
User (for user data)
LoanType (just for loan type list)
UserLoanType (mapping between user and loan type)
All 3 models have HAS_MANY and BELONGS_TO relations as we generally do in YII.
Now when user click on register button i want to save data in user_loan_type table as well. I can simply add core php logic in actionCreate. But is there any standard YII practice for this?? Because i need validation, remain form selected during edit etc. Can anyone guide me how to do this? Or point me any example link, i have googled but did’t help.