In editor - example of how to use explode/implode formatters for a checkbox?
In editor - example of how to use explode/implode formatters for a checkbox?
I need to format a one character database text field (Y/N) to a client checkbox. Any examples of the editor formatters?
Ready to use formatters
The Editor libraries provider a number of method that are ready to use to perform formatting on the Field class instances. These methods are available as static members of the Format class. Each method returns a function of the type required by the Field formatter methods.
Arrays
- explode( delimiter ) - Convert an array of values from a checkbox into a string which can be used to store in a text field in a database. - Option: The delimiter to use - default value: |.
- implode( delimiter ) - Convert a string of values into an array for use with checkboxes. - Option: The delimiter to use - default value: |.
Replies
Javascript, field definition:
you don't need an additional formatter for this.