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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Add switch button as field to tab


Go to End


3 Posts   1416 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, 5523 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?