burnbright / silverstripe-termsandconditionscheckboxfield
Terms and conditions checkbox field for SilverStripe
Package info
github.com/burnbright/silverstripe-termsandconditionscheckboxfield
Type:silverstripe-module
pkg:composer/burnbright/silverstripe-termsandconditionscheckboxfield
dev-master
2017-04-02 05:51 UTC
Requires
- silverstripe/framework: ^3.1
This package is auto-updated.
Last update: 2026-02-24 22:20:11 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>."