Default value and date validation

Thanks!

Actually, I copy/pasted the code and just changed the variable names, so the ' and " should be correct. But I copied both relevant & required markers, maybe this was the problem.

Using only (in age) the part ${dob}='' worked fine when I entered it as XLS code. Interestingly, when I just used the same in the Kobo-field (not through XLS), this created the error above.

Anyways, now I see the age field only when I have no DOB entry, this is great. Making the age field then mandatory should already make the trick, since it get's disabled if we have a DOB?

And I have still the problem with the if-clause, it always gets the value from DOB, even with no DOB was entered (then the value is still NaN). Is there a way to test if something is a date, e.g. isdate(${DOB})? Or am I still doing something wrong with it? I use definitely ''...