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   517 Views

Avatar
ud2013

Community Member, 6 Posts

1 June 2013 at 2:15am

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

Avatar
Willr

Forum Moderator, 5513 Posts

2 June 2013 at 2:40pm

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

Community Member, 6 Posts

4 June 2013 at 7:52am

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?