如何根据选定的单选按钮重定向用户?
这是一个使用会话的多页表单。数据与表单的最后一页一起存储。我正在关注本教程:https ://www.5balloons.info/multi-page-step-form-in-laravel-with-validation/
我希望它这样做:如果选中“是”,如果选中“否”,则转到下一页,跳过下一页并转到后面的页面。
<form action="/form/update-step4" method="post">
@csrf
<div class="form-group">
<label class="radio-inline"><input type="radio" name="is_employed" value="1" {{{ (isset($user->is_employed) && $user->is_employed == '1') ? "checked" : "" }}}> Yes</label>
<label class="radio-inline"><input type="radio" name="is_employed" value="0" {{{ (isset($user->is_employed) && $user->is_employed == '0') ? "checked" : "" }}} checked> No</label>
</div>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<button type="submit" class="btn btn-primary">Continue</button>
</form>