Just a bit stuck, I have this
So Basically in my form I the due date is hidden until the is pregnant box is ticked. This works fine on the create form view.
But in the edit form view i have a problem as that code works as it should. but not how i want it to.
If on the create form the pregnant box is ticked and the due date is filled in. On the edit page when the form loads the pregnant box is ticked but the due date is hided, until I click the pregnant box twice.
Im new to jquery functions
Code:
$(function () {
$('.dueDate').hide();
$('#Pregnant').change(function () {
if ($('#Pregnant').is(':checked')) {
$('.dueDate').show();
} else {
$('.dueDate').hide();
}
});
}
But in the edit form view i have a problem as that code works as it should. but not how i want it to.
If on the create form the pregnant box is ticked and the due date is filled in. On the edit page when the form loads the pregnant box is ticked but the due date is hided, until I click the pregnant box twice.
Im new to jquery functions