Custom form field attributes in form designer
Jamroom Developers
Yes, I see that now, it works fine as a field in a module item.
It's a javascript color picker where the js can have several options and events to configure the color picker.
I wanted to pass these options in as attributes to add data- attributes to the input.
The intention was to be able to pass them in in the options field in form designer and have it work for module items as well, but it is actually in a config setting that I wanted to use it.
The attributes:
Quote:
// flat: bool,
// showInput: bool,
// showInitial: bool,
// allowEmpty: bool,
// showAlpha: bool,
// disabled: bool,
// localStorageKey: string,
// showPalette: bool,
// showPaletteOnly: bool,
// showSelectionPalette: bool,
// clickoutFiresChange: bool,
// cancelText: string,
// chooseText: string,
// containerClassName: string,
// replacerClassName: string,
// preferredFormat: string,
// maxSelectionSize: int,
// palette: [[string] ] ,
// selectionPalette: [string]
The script:
http://bgrins.github.io/spectrum/
updated by @ultrajam: 04/11/14 08:15:40AM