Skip to content

SilverStripe field for providing arbitrary text input or selecting from YAML configurable presets.

Notifications You must be signed in to change notification settings

helpfulrobot/briceburg-silverstripe-flexichoice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silverstripe-flexichoice

SilverStripe field for providing arbitrary text input or selecting from YAML configurable presets.

Requirements

SilverStripe 3+

Screenshots

flexichoice field

(the 'Link Text' field demonstrates a FlexiChoiceField, the 'Link' field is a silverstripe-flexilink field)

Usage

  • Add FlexiChoice field types to your DataObject(s)
class BlockContentHeading extends DataObject {
  private static $db = array(
    'Title'     => 'Varchar',
    'Content'   => 'Text',
    'Link'      => 'FlexiLink',
    'LinkText'  => 'FlexiChoice', // <--- here
  );
  

Trigger the environment builder (/dev/build) after extending objects -- You will now see the FlexiChoiceField appear in the CMS when editing your object.

FlexiChoiceField:
  choices:
    - LEARN MORE
    - READ MORE
    - MORE
    - GET STARTED

You may of course subclass FlexiChoiceField to provide multiple fields with different choice selections.

About

SilverStripe field for providing arbitrary text input or selecting from YAML configurable presets.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 84.9%
  • JavaScript 12.7%
  • CSS 2.4%