Form data save issue.

I am having an issue with relationships. I think. This issue i am facing is that when I create a new object in a repeater. The initial save is not saving the relationship to the users address but if i go back and update it, it then saves and updates the address. I am trying to diagnose the issue since the form updates after the user detail object exists.
1 Reply
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP5mo ago
Grid::make(2)
->relationship('physicalAddress')
->schema(AddressComponents::getAddressSchema()),
Grid::make(2)
->relationship('physicalAddress')
->schema(AddressComponents::getAddressSchema()),
public static function getAddressSchema(): array {
return [
TextInput::make('address_street_1')
->label('Street Address'),
TextInput::make('address_street_2')
->label('Street Address Line 2')
->hint(new HtmlString('<a style="color: blue;"> Optional Information</a>')),
TextInput::make('city')
->label('City'),
TextInput::make('state')
->label('State'),
TextInput::make('zipcode')
->numeric()
->label('Zipcode'),
TextInput::make('country')
->label('Country'),
];
}
public static function getAddressSchema(): array {
return [
TextInput::make('address_street_1')
->label('Street Address'),
TextInput::make('address_street_2')
->label('Street Address Line 2')
->hint(new HtmlString('<a style="color: blue;"> Optional Information</a>')),
TextInput::make('city')
->label('City'),
TextInput::make('state')
->label('State'),
TextInput::make('zipcode')
->numeric()
->label('Zipcode'),
TextInput::make('country')
->label('Country'),
];
}
Want results from more Discord servers?
Add your server