Selecting one of the breast feeding methods will auto select breast milk as the type

This commit is contained in:
Nicholas Trecina 2021-09-08 21:56:12 -07:00 committed by Christopher Charbonneau Wells
parent 2dfb2993ca
commit fc8b230928
1 changed files with 6 additions and 0 deletions

View File

@ -43,5 +43,11 @@
$('#id_method').val('bottle');
}
});
$('#id_method').change(function() {
var method = $('#id_method').val();
if (['left breast', 'right breast', 'both breasts'].includes(method)) {
$('#id_type').val('breast milk');
}
});
</script>
{% endblock %}