milkyway-multimedia / ss-mwm-formfields
Some additional form fields to use with the Silverstripe Framework
Installs: 940
Dependents: 2
Suggesters: 3
Security: 0
Stars: 5
Watchers: 3
Forks: 3
Open Issues: 2
Type:silverstripe-module
Requires
- php: >=5.4
- silverstripe/framework: ~3.1
Suggests
- milkyway-multimedia/ss-zen-forms: Additional form field methods and extensions to make forms work with bootstrap and ajax, as well as validation constraints
This package is not auto-updated.
Last update: 2024-12-07 19:39:11 UTC
README
Still in heavy development
Due to some limitations, this may not work the way I want it, so the API will be changing frequently until I am happy with it. Please use with caution if you must use it at all.
Milkyway Form Fields is a set of form fields that we use across a variety of projects and didn't think we would need a separate module for each.
Install
Add the following to your composer.json file
"require" : {
"milkyway-multimedia/ss-mwm-formfields": "dev-master"
}
Usage
Composite Fields
These fields work as composite fields, with the ability to group form fields into certain components
- HasOneCompositeField: Save a has one relationship as if it is part of the current form. Can also be used to completely save a different record if need be.
- InlineFormField: Save a form as part of another form (kind of like ajaxing it).
- AccordionComponentField: A composite field that acts like an accordion. Uses Twitter Bootstrap styling.
- ModalWindowField: A composite field that acts like a modal window, with the option to set a trigger, or to trigger automatically. Uses Twitter Bootstrap styling.
- PanelComponentField: A composite field that displays as a panel
- SliderComponentField: A composite field that displays a slider. Uses Twitter Bootstrap styling.
- TabComponentField: A composite field that displays fields in a tab. Uses Twitter Bootstrap styling.
Helper Fields
These are fields that use the LiteralField as a base, but are just there to make developing with forms a little bit faster (and more zen)
- FormActionLink: Display a link like a button - uses Twitter Bootstrap styling - to get it to work in the CMS, make sure you use FormActionLink::create($name, $content, $link)->cms()
- FormMessageField: Display a message to the user - uses Twitter Bootstrap styling - to get it to work in the CMS, make sure you use FormMessage::create($name, $content, $type)->cms()
- HorizontalRuleField: Display a horizontal rule, or just separate with blank paragraphs by using SpacerField::create($name)->invisible()
- IframeField: Display a page in an iframe within the form
- FlyoutLabelField: Display a label in a flyout number, to better match the Silverstripe CMS styling.
Functional Fields
- GroupedListboxField: Allows you to use a two dimensional array with ListboxField
- RangeSliderField: Display a slider that saves values to the database
- TabbedSelectionGroup: Display selection groups in tabs, or a tab dropdown (to save space)
- Select2Field
- TypeAheadField
Extended Functionality
- HTMLEditorField - extras: Adds ability to limit characters on HTMLEditorFields, define more custom configuration such as buttons, iframe CSS and more.
License
- MIT
Version
- Version 0.2 (Alpha)
Develop
This project relies on the mwm.buildr module. This means you can develop the code with live updating and automatic building on file changes, simply run the command below to get this functionality.
gulp --dev
For more information about this functionality, please read: https://bitbucket.org/milkyway-multimedia/mwm.buildr/raw/master/README.md
Contact
Milkyway Multimedia
- Homepage: http://milkywaymultimedia.com.au
- E-mail: mell@milkywaymultimedia.com.au
- Twitter: @mwmdesign