Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Collecting Date Of Birth Using 3 Dropdown, Then Converting To Date Obj ?

$
0
0
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

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>