I want to take user birth day into my database and there is a field in the table called dob. When I created model and CRUD it generated text field for dob as always. But I want to create three inputs.
- For years
- For Months
- and for dates
So my question is how to add extra inputs in the model's form. I was thinking of adding new attributes to the model class but there are no such attributes in the table.
Add the fields to your model:
Add these methods to your model:
You can now use them in your CActiveForm form: