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:Jump to 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.
6 Replies
You have duplicated the relationship.....
That is the whole point, I need to visualise the fields in different places of the form
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
I don't think the vision of our project is relevant, just want to know if this is a technical limitation.
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.
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