10928 Posts in 2612 Topics by 1809 members
|Go to End|
12 February 2013 at 2:35pm
My question is - how to add custom field component to the fields list?
For example, I would like to use SS-color-picker (https://github.com/dimension27/silverstripe-color-picker) with UserForms.
12 February 2013 at 5:38pm
UserForms automatically picks up any subclasses of EditableFormField so you can create userforms compatible versions of form fields as you wish. For an example see https://github.com/wilr/silverstripe-googlemapselectionfield (or more specifically - https://github.com/wilr/silverstripe-googlemapselectionfield/blob/master/code/EditableGoogleMapSelectableField.php)
13 February 2013 at 8:47am
Hmmm, I've checked on fresh new installation of SS3.0.3 and three modules (userforms, colorpicker and googlemapselectionfield).
Yes, Google map in the list, but not colorpicker
Logically - I have problems with colorpicker... OK, I'll try to find it.
13 February 2013 at 9:44am
As I said, you'll need to create an EditableFormField class. This will act as a wrapper around the Color picker field. You may wish to email the author of ColorPicker to add that class for you.
13 February 2013 at 12:03pm
Thank you for quick help
I've done it by myself. Now it works
|Go to Top|