This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I created 2 Models, https://gist.github.com/NemoD503/d9949ac51ca0905d90a6#file-models-php Tables for Models, https://gist.github.com/NemoD503/d9949ac51ca0905d90a6#file-tables-php And form fields. https://gist.github.com/NemoD503/d9949ac51ca0905d90a6#file-form-fields-yaml
But, maybe I do something wrong...
In backend, when I tried to create Progrm Model, I have an error
Call to undefined method Backend\FormWidgets\Relation::makeFormWidget()
/home/kolya/www/e-mba/modules/backend/widgets/form/partials/_field_widget.htm line 4
I don`t know why so?
$this in partial _field_widget.htm should be Odject of class
Backend\Widgets\Form
not
Backend\FormWidgets\Relation
P.S. Sorry for my english.
Last updated
Update: if I add to /module/backend/formwidgets/Relation.php makeRenderFormField() morphMany in array
if (in_array($this->relationType, ['belongsToMany', 'morphToMany', 'morphedByMany', 'morphMany'])) {
$field->type = 'checkboxlist';
}
So, backend now render fine, but, Model relation don`t save ...
Last updated
1-2 of 2