Forms

Terms

The "I agree to the terms" checkbox of a sign-up form, with links to the Terms of Service, Terms of Use and Privacy Policy that the app has. The sentence is built from the documents found and translated.

Blade

With routes named terms-of-service and privacy-policy, a checkbox labelled "I agree to the Terms of Service and Privacy Policy", where each document name is a link opening in a new tab. Without any of those routes, "I accept the terms and conditions". required stops the form from being sent unchecked.

"I agree to the Terms of Use and Privacy Policy", linking to those URLs.

Blade

As a toggle #

The same sentence in a toggle button instead of a checkbox.

Accepted: false
Blade

Only some documents #

The sentence is built from the documents given: with only terms-of-use or only privacy-policy, it names just that one.

Blade

Size, color and help #

Every other attribute goes to the checkbox: size, color, help...

You can withdraw your consent at any time.

Blade

In a sign-up form #

Bound with wire:model and validated with the accepted rule; the error shows under the checkbox until it is checked.

Blade

Reference

tk:terms.acceptance

tk:terms.acceptance

Prop Type Default Description
termsOfService string the terms-of-service route The Terms of Service URL.
termsOfUse string the terms-of-use route The Terms of Use URL.
privacyPolicy string the privacy-policy route The Privacy Policy URL.
toggle bool false Renders a tk:toggle instead of a tk:checkbox.

The routes are also looked up with the terms. prefix (terms.privacy-policy). Every other attribute goes to the checkbox (or toggle): name, wire:model, required, color, help...

Customization

As tk:checkbox.

blade

Accessibility

A labelled native checkbox; the links inside the label are reachable with Tab and open in a new tab with rel="noopener noreferrer".

Behavior notes

  • The sentence has a translation for each combination of documents, so it reads naturally in other languages.