How to share saved data from 2 different input fields This is hard to explain...but i will try.

I want users to be able to input their age in 2 different ways:


Date of birth field (this will display age with computed field)
Age with drop down integer (age from 18-99)


I want the age to be displayed on the same field in the User View Display.

Please ask for clarification if not clear.
You can use this code to compute age from date field:

    //compute age
    $bdayunix = strtotime($data-&gt;node_data_field_role_field_birthdate_value);
    $nowunix = time();
    $unixage = $nowunix - $bdayunix;
    $age = floor($unixage/ (365 * 24 * 60 * 60));

    print $age;


I hope these links will also help you solving your problem:


https://www.drupal.org/node/149237
http://www.kadimi.com/en/age-from-date-of-birth-in-drupal-7