-
kekepikentronAsked on June 17, 2014 at 5:00 AM
Hallo,
i would like to calculate age via birth date picker. I saw some previous issues in Forum, but the problem is that we would like the user to choose the birth date from drop-down list (as it is in birth date picker) and not from calendar (as it appears through date picker).
Is this possible? Waiting for your answer.
Sincerely,
TIMOTHEOS TSAKALOS
WWW.VOUCHERNEWS.GR
-
CarinaReplied on June 17, 2014 at 11:30 AM
I believe it is not possible, because in order to determine the age we need an extra date field that gets the today default date, so we can subtract from the birthdate. And the only date field that has the default date option is the DateTime field which uses numeric values for months, as the BirthDate Picker uses text values for months.
I forwarded a feature request to our developer's team so they can take into consideration a future implementation. They will contact you via this thread once they have an update on this.
You can check and clone this test form:
http://form.jotformpro.com/form/41674661121955?
There is a hidden DateTime field that has the default time on and in the calculation field we subtract the today field for the birthday and then divide it by 365 (days) to get the years:
Let us know if further support is needed.
-
kingfisherweddingsReplied on April 8, 2015 at 11:17 AM
-
CarinaReplied on April 8, 2015 at 12:27 PM
@kingfisherweddings
I moved your request to a new thread so it can be properly addressed:
http://www.jotform.com/answers/548432
Let us know if we can assist you further.
-
CarinaReplied on April 8, 2015 at 12:36 PM
Actually this already can be done by adding 2 datefields, one of them with default date of today:
Then add a form calculation widget with the formula (todayfield-birthdatefield)/365:
You can test and clone the demo form:
http://form.jotformpro.com/form/50974521706962?
Let us know if we can assist you further.
-
kingfisherweddingsReplied on April 8, 2015 at 12:59 PM
It doesn't work because the birth date format contains text ( january, february) and the today date contains numbers ( 01/02)
Well at least i cannot get it to work :(
http://www.jotform.co/kingfisherweddings/wedding_application
-
CarinaReplied on April 8, 2015 at 1:14 PM
The date format is not the same. You have ddmm and on the other you have mmdd:
Let us know if the problem persists.
-
dmilling0112Replied on May 8, 2015 at 11:35 PM
i am just starting to use the calculation in a form i am testing. However, I am finding that in my browsers, the calculation is not happening unless I "refresh" my screen. In the Jotform site, when I test it, it calculates real-time, but not when I have it embedded in my HTML code.
I need it real-time because I have a couple other fields that are dependent on the age calculation.
Any advice?
-
BorisReplied on May 9, 2015 at 4:10 AM
Hello.
It sounds as there might be some conflict between our form's scripts and the scripts on your page.
Can you please try embedding the form as an iFrame embed, and see if that resolves the issue in automatic calculation?
It would also help if you could provide us with the link to the page where you have embedded the form, so that we may take a look into what is going wrong with the calculation. Please let us know, we will be glad to assist you.
With kind regards,
Boris -
wsfarmReplied on May 9, 2015 at 11:56 AM
Here is a solution using the Birth Picker:
http://www.jotform.com/form-templates/age-calc-accurate-using-birth-picker
As far as I can tell it is accurate. It is based on the template mentioned above, but uses the Birth Picker and is accurate (at least within one day).
Cheers
Charlie
wsfarm