Hello, I can't fill a text field with the age calculated from the date of a calendar field.
I tried to add this script in css/javascript
<script type="text/javascript">
function birth( ) {
document.getElementById('age').value = document.getElementById('datebirth').value;
}
</script>
and I call my function when I click on next page of the form but I have the following error:
Uncaught TypeError: Cannot read properties of null (reading 'value')
Unfortunately I don't know much about javascript...