Plausibility check as jQuery code?
I need a plausibility check as jQuery code for an output to check or enter an age: Under Date of Birth you type in the date, and under Year_Setup you should type in an age (number) that matches the date.
This means that if you type in a date like 23.06.2020, you can only type in numbers from 1 to 3, otherwise you will get an error message
<label for="Geburtsdatum"style="width:165px;">Geburtsdatum</label> <input type="text" class="form-control" style="width: 129px;" style="max-width: 130px;" id="Geburtsdatum" name="Geburtsdatum" value="{if $pdf}{$values.Geburtsdatum}{/if}"> <label for="Jahr_Einrichtung" style="width: 120px;">Das Kind besucht seit</label> input type="text" class="form-control" maxlength="2" style="width: 30px;" name="Jahr_Einrichtung" value="{if $pdf}{$values.Jahr_Einrichtung}{/if}">
Alex
Date of birth and age both, makes less sense
But if customers are unfriendly input, no jQuery is necessary