98 Posts
Edwin
9 years ago
2
Topic

Hi all

Using the birthdate field I am able to get the age of the person. But how do I change the value of a field based on the age of the person? For example: If the person is aged up to 3 years it must automatically classify as "baby". 4 to 12 years as "child". 13 to 19 years as "teenager". 20 and over as "adult". How do I accomplish that?

Thanx in advance

Get a VIP membership
9 years ago
1
Level 1

Hello Edwin,

I think that the classification you need is only for content or item view ?

If yes, you can use a plugin field "Code BeforeRender" to test the age, and then display the good classification.

If you need to store in database the classification, do the same but on the event "BeforeStore".

Regards.

Lionel

98 Posts
Edwin
9 years ago
0
Level 2

Hello Lionel.
Thank you very much for your reply. I will try it and let you know.

Regards

Edwin

Get a VIP membership