• Resolved crldev

    (@crldev)


    Hi there,

    I love this plugin and this is a long shot…is there an easy way to display someone’s current age based on their date of birth?

    Many thanks,

    Rob

    • This topic was modified 3 years, 7 months ago by crldev.
    • This topic was modified 3 years, 7 months ago by crldev.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xnau webdesign

    (@xnau)

    It is possible, it does require some custom code. I’ve published a tutorial that will get you started on this:

    Showing a Person’s Age in a Record

    Thread Starter crldev

    (@crldev)

    Brilliant. All working. I did have a minor problem that it was showing a fatal error when setting the age field value in a form when DoB was empty/null. There didn’t appear to be a check for null in this function whereas there is a check in set_age_value_display.

    I added the check and it works perfectly.

    Thank you so much.

    Plugin Author xnau webdesign

    (@xnau)

    Glad you got it working, and thanks for the feedback, I’ll improve the code with that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Convert date of birth to age’ is closed to new replies.