This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Wouter
Wouter

Hello, on the moment I try to to save some backend form fields in a relation. When I create the relation I get any time to see a widget to add / remove a relation. What I want is to save the values of some form elements in a different table (relation). But how do I create a relation in a backend form without widgets?

I have add to a form field:

          type: relation
           options:
           nameColom: eenheid

When I open the create page October just select name and id form the relation table.

Last updated

Wouter
Wouter

Still haven't found to have any solution about my question. But I think also my question was not really clear.

For example I have to follow backend form elements:

tabs:
    fields:
        field1:
            label: Field1
            span: left   
            tab: tab1

        field2:
            label: Field2
            tab: tab1
            span: right

        field3:
            tab: tab2
            size: giant
            type: richeditor

        field4:
            label: Field4
            tab: tab2
            span: right

What is now want to do is save the field 1 and 2 to the database table of the model. Field 3 and 4 I want to save to a table with a relation. Is this possible and how do I have to create this relation ?

I have read https://octobercms.com/docs/backend/relations many times but I get always a relation with a widget.

viral-vector
viral-vector

Bump... i would also like the answer to this.

To plain Jane it: Is it possible to expose relation fields on the parent model edit & create views?

So lets say i have a "student" table and a "student_prefs" table. I would like to expose all of the fields from the "student" & "student_prefs" tables in one form without the need of the relation pop up window...& on save October pick up & update both the parent and relation (student & student_prefs).

chris10207
chris10207

did you check out this video explaining backend relation ?

https://vimeo.com/123489421

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.