瀏覽代碼

reset form

master
farhan 8 月之前
父節點
當前提交
0267c86ea0
共有 2 個檔案被更改,包括 2 行新增0 行删除
  1. 1
    0
      resources/views/modals/guestbook-modal.blade.php
  2. 1
    0
      resources/views/modals/rsvp-modal.blade.php

+ 1
- 0
resources/views/modals/guestbook-modal.blade.php 查看文件

42
             data: formData,
42
             data: formData,
43
             success: function(response) {
43
             success: function(response) {
44
               $('#closeSpeechForm').submit();
44
               $('#closeSpeechForm').submit();
45
+              $('#speechForm')[0].reset();
45
               var alertContainer = $('.alert-info');
46
               var alertContainer = $('.alert-info');
46
               alertContainer.find('span').text(response.message); // Set message text
47
               alertContainer.find('span').text(response.message); // Set message text
47
               alertContainer.fadeIn().removeClass('hidden'); // Show the alert
48
               alertContainer.fadeIn().removeClass('hidden'); // Show the alert

+ 1
- 0
resources/views/modals/rsvp-modal.blade.php 查看文件

48
           data: formData,
48
           data: formData,
49
           success: function(response) {
49
           success: function(response) {
50
             $('#closeRsvpForm').submit();
50
             $('#closeRsvpForm').submit();
51
+            $('#rsvpForm')[0].reset();
51
             var alertContainer = $('.alert-info');
52
             var alertContainer = $('.alert-info');
52
             alertContainer.find('span').text(response.message); // Set message text
53
             alertContainer.find('span').text(response.message); // Set message text
53
             alertContainer.fadeIn().removeClass('hidden'); // Show the alert
54
             alertContainer.fadeIn().removeClass('hidden'); // Show the alert

Loading…
取消
儲存