Closed jedateach closed 8 years ago
@jedateach thanks for doing the ground work. I've pulled in a lot of this code here https://github.com/sheadawson/silverstripe-shortcodable/commit/40929c75e2a54fa3da9067e68b1a290b1ebad525
This fixes #12. Only issue left is UploadFields and any other fields that have array values like CheckboxSetField
Upload fields and others with array values now working https://github.com/sheadawson/silverstripe-shortcodable/commit/22e68fc47913811b36980f04acae39dc0db7ee2c
@sheadawson I wouldn't merge this yet, I'm just creating this pull request to start the conversation about changes I'm making.
I've restructured the controller a bit into separated functions. I've added an 'edit' route so that includes the shortcode type. This allows us to use form fields that require ajax, such as UploadField, etc.
Its probably easiest to glance over this file: https://github.com/jedateach/silverstripe-shortcodable/blob/formcontrollerfix/code/controllers/ShortcodableController.php
Theres a few issues I hope to resolve:
ImageID[Files][]=23
. It would be nicer if this was justImageID=23
I'm not sure if I've broken the data object stuff, as so far I've just worked with a ViewableData class.
OverviewLink (Shortcodable) object: https://gist.github.com/jedateach/a13928f1032fe0df8825