Form relation fields of same relation in different groups/Fieldset

I can't figure out how to add fields from the same relation to different groups or Fieldsets. Only the last group seems to be linked to the relation. e.g.: ``` $form ->schema([ group::make() ->relationship('user') ->schema([ TextInput::make('name') ]), TextInput:make('some_field'), group::make() ->relationship('user') ->schema([ TextInput::make('email') ]) ])
Solution:
Well it is, if you want the fields to be completely random in position in your vision that is not possible. IF you want them in a box on the right or on the left, or in their own section, then that's where we can explain how to achieve that. Which is all relative to your view of what you are trying to acheive.
Jump to solution
6 Replies
toeknee
toeknee13mo ago
You have duplicated the relationship.....
$form
->schema([
TextInput:make('some_field'),
group::make()
->relationship('user')
->schema([
TextInput::make('name')
TextInput::make('email')
])
])
$form
->schema([
TextInput:make('some_field'),
group::make()
->relationship('user')
->schema([
TextInput::make('name')
TextInput::make('email')
])
])
MichaelMdp
MichaelMdpOP13mo ago
That is the whole point, I need to visualise the fields in different places of the form
toeknee
toeknee13mo ago
So you can't do that outside of a relationship Can you provide a vison of what you want to achieve? The fields shouldn't overload with other form fields
MichaelMdp
MichaelMdpOP13mo ago
I don't think the vision of our project is relevant, just want to know if this is a technical limitation.
Solution
toeknee
toeknee13mo ago
Well it is, if you want the fields to be completely random in position in your vision that is not possible. IF you want them in a box on the right or on the left, or in their own section, then that's where we can explain how to achieve that. Which is all relative to your view of what you are trying to acheive.
MichaelMdp
MichaelMdpOP13mo ago
We have an intro section with mostly fields related to the relation and then a details section with fields from the record + the relation ... or that was the vision, guess I'll have to move the fields
Want results from more Discord servers?
Add your server