diff --git a/resources/views/form/rapport-zenova/1791280835-abcbb25f-eff6-4036-8575-2ef55ef78f79.blade.php b/resources/views/form/rapport-zenova/1791280835-abcbb25f-eff6-4036-8575-2ef55ef78f79.blade.php index 16481c36..6da369f8 100644 --- a/resources/views/form/rapport-zenova/1791280835-abcbb25f-eff6-4036-8575-2ef55ef78f79.blade.php +++ b/resources/views/form/rapport-zenova/1791280835-abcbb25f-eff6-4036-8575-2ef55ef78f79.blade.php @@ -246,6 +246,27 @@ $('#field-total_rx_count').val(total) }) + + const selector = '#field-sitazit_rx_count, #field-sitazit_dm_rx_count, #field-sitazit_d_rx_count, #field-sitazit_m_rx_count, #field-sitazit_trio_rx_count'; + + $(selector).on('input', function() { + + let value = this.value.replace(/[^0-9]/g, ''); + + + value = value.replace(/^0+/, ''); + + this.value = value; + }); + + + $(selector).on('keypress', function(e) { + + if (e.which < 48 || e.which > 57) { + e.preventDefault(); + } + }); + $('#field-file_upload').on('change', function () { let file = this.files[0];