burnbright / silverstripe-termsandconditionscheckboxfield
Terms and conditions checkbox field for SilverStripe
Installs: 66
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:silverstripe-module
Requires
- silverstripe/framework: ^3.1
This package is auto-updated.
Last update: 2024-10-24 19:26:06 UTC
README
A checkbox field (with optional page link) that must be checked for form validation to succeed.
Usage
// when building a Form's fields $fields->push( TermsAndConditionsCheckboxField::create() ->setTermsPage(SiteTree::get_by_link("terms-and-conditions")); );
Customise message
Either set the field's Title, or update lang file:
en: TermsAndConditionsCheckboxField: PageLinkContent: "I agree to the <a href=\"{TermsPageLink}\" target=\"new\" title=\"Read the terms and conditions for this site\">{TermsPageTitle}</a>."