Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用laravel提交记录时添加确认弹出窗口_Php_Html_Css_Laravel_Laravel 8 - Fatal编程技术网

Php 使用laravel提交记录时添加确认弹出窗口

Php 使用laravel提交记录时添加确认弹出窗口,php,html,css,laravel,laravel-8,Php,Html,Css,Laravel,Laravel 8,我正在制作一个添加按钮,单击它会显示一个模式,在该模式下可以输入数据,但单击时,此记录会被发送,为了避免错误,我希望添加一个确认(是或否)弹出窗口,以确保用户确定提交。以前有人用过这个吗 这是我的模式代码: <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden

我正在制作一个添加按钮,单击它会显示一个模式,在该模式下可以输入数据,但单击时,此记录会被发送,为了避免错误,我希望添加一个确认(是或否)弹出窗口,以确保用户确定提交。以前有人用过这个吗

这是我的模式代码:

<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">Subject add</h5>
    
        </div>
        <form action="/test/save-subject" method="POST">
            {{ csrf_field() }}
            <div class="modal-body">
          
            <div class="mb-3">
              <label for="recipient-name" class="col-form-label">Subject ID:</label>
              <input type="text" name="subjectcode" class="form-control" id="recipient-name" maxlength="6" style="text-transform:uppercase" required>
            </div>

            <div class="mb-3">
              <label for="message-text" class="col-form-label">Description:</label>
              <textarea name="detail" class="form-control" id="message-text" required></textarea>
            </div>

            <div class="mb-3">
                <label for="recipient-name" class="col-form-label">Email Address:</label>
                <input type="text" name="emailaddress" class="form-control" id="recipient-name" required>
              </div>
              <div>         
              <input type="checkbox" name="staff" value="1"> <label>Staff Update</label>
              </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
          <button type="submit" class="btn btn-primary">Add</button>
        </div>
    </form>
      </div>
    </div>
  </div>

主题添加
{{csrf_field()}}
受试者ID:
说明:
电邮地址:
员工更新
接近
添加

如果我理解正确,在用户单击“添加”后,您希望添加另一个确认模式吗?不是很好用。。。你试过什么?是的,没错。这是计划中的一项关键行动,因此我想确保信息填写正确。我试过一个JS弹出窗口,但效果似乎不太好。你到底用JS做了什么?
(摘自)对您无效吗?@DefinitelynotRafal no不起作用它提交时没有消息