Saving Form Data Which Is Created Using Form Generator Into A Separate Table

We have been doing a project in yii. We are developing a web application to enable faculty to post attendance and marks.We have 3 models faculty,subjects and branches .We need to map faculty and subjects so that faculty can post attendance and marks of students for the subjects they are dealing with.Since our requirement specifies that a faculty can teach any number of subjects and a subject can be taught by any number of teachers since we have sections in each branch.So we created a model for the join table FacultySubjectmapping and form using form generator since crud generator cannot create form for composite primary key facultyID+subjectID+section.We are getting data from database tables Faculty,Branches and Subjects for FacultySubjectmapping form but we cannot save that selected values of drop down into the FacultySubjectmapping table.

Please help us to sort out this problem.