Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages