Skip to content

burnbright/silverstripe-termsandconditionscheckboxfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terms And Conditions Checkbox Field

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>."

About

Terms and conditions checkbox field for SilverStripe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages