Best way to get date of birth

Status
Not open for further replies.

cookn22

Active Member
I'm using fabrik 1.04

Right now I have a form element called 'dob' (date of birth) which is just a text field. What I'd like to be able to do is this: On my form, have three drop-down lists with month, date and year, and when the form is submitted the selections are put into the element 'dob' in the format "month/date/year". It would be nice to be able to do this instead of having to have individual elements for month, date and year.

I suppose another way to do it would be to have a text field that already has the forward-slashes permanently in it, like "__ /__ /____", but I have no clue how to do that :(
 
You could do this with some simple JavaScript tied to the submit event for the form.

I believe I posted a sample script a while back for doing form validation when submitting a form, and also an example of how to combine multiple elements into another element (in that case it was summing two numeric values, but the principle is the same). Those two examples should give you everything you need to know.

I'm on the road at the moment, on a horribly slow link, or I'd find the examples I posted and point you at them. Let me know if you can't find them (search for things like 'javascript onchange submit' etc), and I'll see what I can dig up next time I log in on some connection better than a piece of string with baked bean cans on each end.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top