I am new to yii.. I am developing a form in which i am having a registration form in which i need to get education details of a student. It includes
'Post Graduation',
'Graduation' and
'Schooling'
details. Each of this will be having pass year, qualification etc fields.
public function attributeLabels()
{
return array(
'id' => 'ID',
'user_id' => 'User',
'qualification_id' => 'Qualification',
'specialization_id' => 'Specialization',
'pass_year' => 'Pass Year',
'university_id' => 'University',
'duration_from' => 'Duration From',
'duration_to' => 'Duration To',
'percentage_marks' => '% of Marks / GPA',
'course_type_id' => 'Course Type',
'awards' => 'Awards & Scholarships',
);
}
How can i use the same model to create similar elements to get these details separately for
'Post Graduation',
'Graduation' and
'Schooling'
I tried by creating different objects for the model and including them in the form.
$postGraduate = new CandidateQualification;
$graduate = new CandidateQualification;
$preGraduate = new CandidateQualification;
But this create problem as all of them will be having same name and validation also wont help. Please provide any solution.
Thanks in advance.
Use scenario`s Luke.