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.
Nothing to show
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.
Your own links #
"I agree to the Terms of Use and Privacy Policy", linking to those URLs.
Nothing to show
As a toggle #
The same sentence in a toggle button instead of a checkbox.
Nothing to show
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.
Nothing to show
Size, color and help #
Every other attribute goes to the checkbox: size, color, help...
Nothing to show
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.
Nothing to show
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.
Nothing to show
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.