In my database, I have a date of birth (dob) field that is of type date.
When I create model from my table, it creates one attribute as dob for
me.
So when I generate my form from my model, it has one field that can collect
the user's date of birth. What I want to have is to have 3 dropdown elements
each for day month and year. then when I submit my form, they all get bundle
up together as dd-mm-yyyy and get populated to my model attribute "dob"
At this point I can't figure out how to do it using Yii form since the model
gets passed to the view, how can I find a way to accomplish this. So to recap,
-I want to have only one field in my User table for dob as date type
-I want to have 3 dropdowns in my Yii generated form that at submit time they
form my dob and populate it in the $model->user_dob
When I create model from my table, it creates one attribute as dob for
me.
So when I generate my form from my model, it has one field that can collect
the user's date of birth. What I want to have is to have 3 dropdown elements
each for day month and year. then when I submit my form, they all get bundle
up together as dd-mm-yyyy and get populated to my model attribute "dob"
At this point I can't figure out how to do it using Yii form since the model
gets passed to the view, how can I find a way to accomplish this. So to recap,
-I want to have only one field in my User table for dob as date type
-I want to have 3 dropdowns in my Yii generated form that at submit time they
form my dob and populate it in the $model->user_dob