Update method select for when formula types selected (#127)

This commit is contained in:
Peter Hardy 2020-03-26 22:16:07 +11:00
parent 4978208d7f
commit dce0cd1e10
1 changed files with 7 additions and 1 deletions

View File

@ -35,5 +35,11 @@
defaultDate: false defaultDate: false
}); });
BabyBuddy.DatetimePicker.init($('#datetimepicker_end')); BabyBuddy.DatetimePicker.init($('#datetimepicker_end'));
$('#id_type').change(function() {
var feed_type=$('#id_type').val();
if (feed_type=='formula'||feed_type=='fortified breast milk') {
$('#id_method').val('bottle');
}
});
</script> </script>
{% endblock %} {% endblock %}