Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

Add switch button as field to tab


Reply

3 Posts   448 Views

Avatar
ud2013

1 June 2013 at 2:15am Community Member, 6 Posts

Is there a way to add a switchbutton as field to a tab (getCMSFields and addFieldToTab). Link the image below:

Avatar
Willr

2 June 2013 at 2:40pm Forum Moderator, 5511 Posts

You could use something like http://ios-checkboxes.awardwinningfjords.com/ to enhance the default SilverStripe CheckboxField type. Require the javascript / css you need for the button using LeftAndMain::extra_requirements_javascript & LeftAndMain::extra_requirements_css

Avatar
ud2013

4 June 2013 at 7:52am Community Member, 6 Posts

I've been looking at the CheckBoxField.php in the framework/forms folder, but have no idea how to enhance it (I am still a beginner with silverstripe). Can you help me in the right direction?