【问题标题】:check box to accepet terms and conditions when submitting a form - Laravel 8提交表单时接受条款和条件的复选框 - Laravel 8
【发布时间】:2021-04-03 20:55:01
【问题描述】:

我制作了一个表格,将数据提交到数据库

但我希望用户在提交表单之前接受条款和条件

示例:

如何在 Laravel 8 中实现它?

【问题讨论】:

  • 将所需属性添加到

标签: php html database forms laravel-8


【解决方案1】:

也许是这样的:

<input type="checkbox"
    class="form-check-input @error('terms') is-invalid @enderror"
    value="true"
    name="terms"
    id="keep-signed"
    {{ !old('terms') ?: 'checked' }}
>
<label class="form-check-label fs-sm">
    {{ __('I agree to') }}
    <a class="nav-link-style fs-ms text-black-50 text-primary text-decoration-none" href="#">
        {{ __('Terms & Conditions') }}
    </a>
</label>

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 2021-12-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-16
相关资源
最近更新 更多