diff --git a/resources/views/form/rapport-team2/1794811995-cd07ffaa-1b76-40c8-800b-6b2d3c801016.blade.php b/resources/views/form/rapport-team2/1794811995-cd07ffaa-1b76-40c8-800b-6b2d3c801016.blade.php index 691fff52..d8712b35 100644 --- a/resources/views/form/rapport-team2/1794811995-cd07ffaa-1b76-40c8-800b-6b2d3c801016.blade.php +++ b/resources/views/form/rapport-team2/1794811995-cd07ffaa-1b76-40c8-800b-6b2d3c801016.blade.php @@ -595,7 +595,7 @@ // Add another doctor wrapper. The first wrapper is already present in the form. $('#adddoctor-btn').on('click', function () { - if ($('.doctor-wrapper').length >= 10) return; + if ($('.doctor-wrapper').length >= 5) return; const doctorOptions = $('#field-contact_id').html(); doctor_count++; @@ -667,6 +667,7 @@ // Remove a dynamically added doctor wrapper without reusing its element IDs. $(document).on('click', '.btn-remove', function () { + doctor_count--; const $wrapper = $(this).closest('.doctor-wrapper'); $wrapper.find('select').each(function () { if ($(this).hasClass('select2-hidden-accessible')) $(this).select2('destroy');